/******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@fullcalendar/common/main.js":
/*!***************************************************!*\
!*** ./node_modules/@fullcalendar/common/main.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Component": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.Component; },
/* harmony export */ "Fragment": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.Fragment; },
/* harmony export */ "createContext": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createContext; },
/* harmony export */ "createElement": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement; },
/* harmony export */ "createPortal": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createPortal; },
/* harmony export */ "createRef": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef; },
/* harmony export */ "flushSync": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.flushSync; },
/* harmony export */ "render": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.render; },
/* harmony export */ "unmountComponentAtNode": function() { return /* reexport safe */ _vdom_js__WEBPACK_IMPORTED_MODULE_1__.unmountComponentAtNode; },
/* harmony export */ "BASE_OPTION_DEFAULTS": function() { return /* binding */ BASE_OPTION_DEFAULTS; },
/* harmony export */ "BASE_OPTION_REFINERS": function() { return /* binding */ BASE_OPTION_REFINERS; },
/* harmony export */ "BaseComponent": function() { return /* binding */ BaseComponent; },
/* harmony export */ "BgEvent": function() { return /* binding */ BgEvent; },
/* harmony export */ "CalendarApi": function() { return /* binding */ CalendarApi; },
/* harmony export */ "CalendarContent": function() { return /* binding */ CalendarContent; },
/* harmony export */ "CalendarDataManager": function() { return /* binding */ CalendarDataManager; },
/* harmony export */ "CalendarDataProvider": function() { return /* binding */ CalendarDataProvider; },
/* harmony export */ "CalendarRoot": function() { return /* binding */ CalendarRoot; },
/* harmony export */ "ContentHook": function() { return /* binding */ ContentHook; },
/* harmony export */ "CustomContentRenderContext": function() { return /* binding */ CustomContentRenderContext; },
/* harmony export */ "DateComponent": function() { return /* binding */ DateComponent; },
/* harmony export */ "DateEnv": function() { return /* binding */ DateEnv; },
/* harmony export */ "DateProfileGenerator": function() { return /* binding */ DateProfileGenerator; },
/* harmony export */ "DayCellContent": function() { return /* binding */ DayCellContent; },
/* harmony export */ "DayCellRoot": function() { return /* binding */ DayCellRoot; },
/* harmony export */ "DayHeader": function() { return /* binding */ DayHeader; },
/* harmony export */ "DaySeriesModel": function() { return /* binding */ DaySeriesModel; },
/* harmony export */ "DayTableModel": function() { return /* binding */ DayTableModel; },
/* harmony export */ "DelayedRunner": function() { return /* binding */ DelayedRunner; },
/* harmony export */ "ElementDragging": function() { return /* binding */ ElementDragging; },
/* harmony export */ "ElementScrollController": function() { return /* binding */ ElementScrollController; },
/* harmony export */ "Emitter": function() { return /* binding */ Emitter; },
/* harmony export */ "EventApi": function() { return /* binding */ EventApi; },
/* harmony export */ "EventRoot": function() { return /* binding */ EventRoot; },
/* harmony export */ "EventSourceApi": function() { return /* binding */ EventSourceApi; },
/* harmony export */ "Interaction": function() { return /* binding */ Interaction; },
/* harmony export */ "MoreLinkRoot": function() { return /* binding */ MoreLinkRoot; },
/* harmony export */ "MountHook": function() { return /* binding */ MountHook; },
/* harmony export */ "NamedTimeZoneImpl": function() { return /* binding */ NamedTimeZoneImpl; },
/* harmony export */ "NowIndicatorRoot": function() { return /* binding */ NowIndicatorRoot; },
/* harmony export */ "NowTimer": function() { return /* binding */ NowTimer; },
/* harmony export */ "PositionCache": function() { return /* binding */ PositionCache; },
/* harmony export */ "RefMap": function() { return /* binding */ RefMap; },
/* harmony export */ "RenderHook": function() { return /* binding */ RenderHook; },
/* harmony export */ "ScrollController": function() { return /* binding */ ScrollController; },
/* harmony export */ "ScrollResponder": function() { return /* binding */ ScrollResponder; },
/* harmony export */ "Scroller": function() { return /* binding */ Scroller; },
/* harmony export */ "SegHierarchy": function() { return /* binding */ SegHierarchy; },
/* harmony export */ "SimpleScrollGrid": function() { return /* binding */ SimpleScrollGrid; },
/* harmony export */ "Slicer": function() { return /* binding */ Slicer; },
/* harmony export */ "Splitter": function() { return /* binding */ Splitter; },
/* harmony export */ "StandardEvent": function() { return /* binding */ StandardEvent; },
/* harmony export */ "TableDateCell": function() { return /* binding */ TableDateCell; },
/* harmony export */ "TableDowCell": function() { return /* binding */ TableDowCell; },
/* harmony export */ "Theme": function() { return /* binding */ Theme; },
/* harmony export */ "ViewApi": function() { return /* binding */ ViewApi; },
/* harmony export */ "ViewContextType": function() { return /* binding */ ViewContextType; },
/* harmony export */ "ViewRoot": function() { return /* binding */ ViewRoot; },
/* harmony export */ "WeekNumberRoot": function() { return /* binding */ WeekNumberRoot; },
/* harmony export */ "WindowScrollController": function() { return /* binding */ WindowScrollController; },
/* harmony export */ "addDays": function() { return /* binding */ addDays; },
/* harmony export */ "addDurations": function() { return /* binding */ addDurations; },
/* harmony export */ "addMs": function() { return /* binding */ addMs; },
/* harmony export */ "addWeeks": function() { return /* binding */ addWeeks; },
/* harmony export */ "allowContextMenu": function() { return /* binding */ allowContextMenu; },
/* harmony export */ "allowSelection": function() { return /* binding */ allowSelection; },
/* harmony export */ "applyMutationToEventStore": function() { return /* binding */ applyMutationToEventStore; },
/* harmony export */ "applyStyle": function() { return /* binding */ applyStyle; },
/* harmony export */ "applyStyleProp": function() { return /* binding */ applyStyleProp; },
/* harmony export */ "asCleanDays": function() { return /* binding */ asCleanDays; },
/* harmony export */ "asRoughMinutes": function() { return /* binding */ asRoughMinutes; },
/* harmony export */ "asRoughMs": function() { return /* binding */ asRoughMs; },
/* harmony export */ "asRoughSeconds": function() { return /* binding */ asRoughSeconds; },
/* harmony export */ "binarySearch": function() { return /* binding */ binarySearch; },
/* harmony export */ "buildClassNameNormalizer": function() { return /* binding */ buildClassNameNormalizer; },
/* harmony export */ "buildEntryKey": function() { return /* binding */ buildEntryKey; },
/* harmony export */ "buildEventApis": function() { return /* binding */ buildEventApis; },
/* harmony export */ "buildEventRangeKey": function() { return /* binding */ buildEventRangeKey; },
/* harmony export */ "buildHashFromArray": function() { return /* binding */ buildHashFromArray; },
/* harmony export */ "buildIsoString": function() { return /* binding */ buildIsoString; },
/* harmony export */ "buildNavLinkAttrs": function() { return /* binding */ buildNavLinkAttrs; },
/* harmony export */ "buildSegCompareObj": function() { return /* binding */ buildSegCompareObj; },
/* harmony export */ "buildSegTimeText": function() { return /* binding */ buildSegTimeText; },
/* harmony export */ "collectFromHash": function() { return /* binding */ collectFromHash; },
/* harmony export */ "combineEventUis": function() { return /* binding */ combineEventUis; },
/* harmony export */ "compareByFieldSpec": function() { return /* binding */ compareByFieldSpec; },
/* harmony export */ "compareByFieldSpecs": function() { return /* binding */ compareByFieldSpecs; },
/* harmony export */ "compareNumbers": function() { return /* binding */ compareNumbers; },
/* harmony export */ "compareObjs": function() { return /* binding */ compareObjs; },
/* harmony export */ "computeEarliestSegStart": function() { return /* binding */ computeEarliestSegStart; },
/* harmony export */ "computeEdges": function() { return /* binding */ computeEdges; },
/* harmony export */ "computeFallbackHeaderFormat": function() { return /* binding */ computeFallbackHeaderFormat; },
/* harmony export */ "computeHeightAndMargins": function() { return /* binding */ computeHeightAndMargins; },
/* harmony export */ "computeInnerRect": function() { return /* binding */ computeInnerRect; },
/* harmony export */ "computeRect": function() { return /* binding */ computeRect; },
/* harmony export */ "computeSegDraggable": function() { return /* binding */ computeSegDraggable; },
/* harmony export */ "computeSegEndResizable": function() { return /* binding */ computeSegEndResizable; },
/* harmony export */ "computeSegStartResizable": function() { return /* binding */ computeSegStartResizable; },
/* harmony export */ "computeShrinkWidth": function() { return /* binding */ computeShrinkWidth; },
/* harmony export */ "computeSmallestCellWidth": function() { return /* binding */ computeSmallestCellWidth; },
/* harmony export */ "computeVisibleDayRange": function() { return /* binding */ computeVisibleDayRange; },
/* harmony export */ "config": function() { return /* binding */ config; },
/* harmony export */ "constrainPoint": function() { return /* binding */ constrainPoint; },
/* harmony export */ "createAriaClickAttrs": function() { return /* binding */ createAriaClickAttrs; },
/* harmony export */ "createDuration": function() { return /* binding */ createDuration; },
/* harmony export */ "createEmptyEventStore": function() { return /* binding */ createEmptyEventStore; },
/* harmony export */ "createEventInstance": function() { return /* binding */ createEventInstance; },
/* harmony export */ "createEventUi": function() { return /* binding */ createEventUi; },
/* harmony export */ "createFormatter": function() { return /* binding */ createFormatter; },
/* harmony export */ "createPlugin": function() { return /* binding */ createPlugin; },
/* harmony export */ "diffDates": function() { return /* binding */ diffDates; },
/* harmony export */ "diffDayAndTime": function() { return /* binding */ diffDayAndTime; },
/* harmony export */ "diffDays": function() { return /* binding */ diffDays; },
/* harmony export */ "diffPoints": function() { return /* binding */ diffPoints; },
/* harmony export */ "diffWeeks": function() { return /* binding */ diffWeeks; },
/* harmony export */ "diffWholeDays": function() { return /* binding */ diffWholeDays; },
/* harmony export */ "diffWholeWeeks": function() { return /* binding */ diffWholeWeeks; },
/* harmony export */ "disableCursor": function() { return /* binding */ disableCursor; },
/* harmony export */ "elementClosest": function() { return /* binding */ elementClosest; },
/* harmony export */ "elementMatches": function() { return /* binding */ elementMatches; },
/* harmony export */ "enableCursor": function() { return /* binding */ enableCursor; },
/* harmony export */ "eventTupleToStore": function() { return /* binding */ eventTupleToStore; },
/* harmony export */ "filterEventStoreDefs": function() { return /* binding */ filterEventStoreDefs; },
/* harmony export */ "filterHash": function() { return /* binding */ filterHash; },
/* harmony export */ "findDirectChildren": function() { return /* binding */ findDirectChildren; },
/* harmony export */ "findElements": function() { return /* binding */ findElements; },
/* harmony export */ "flexibleCompare": function() { return /* binding */ flexibleCompare; },
/* harmony export */ "formatDate": function() { return /* binding */ formatDate; },
/* harmony export */ "formatDayString": function() { return /* binding */ formatDayString; },
/* harmony export */ "formatIsoTimeString": function() { return /* binding */ formatIsoTimeString; },
/* harmony export */ "formatRange": function() { return /* binding */ formatRange; },
/* harmony export */ "getAllowYScrolling": function() { return /* binding */ getAllowYScrolling; },
/* harmony export */ "getCanVGrowWithinCell": function() { return /* binding */ getCanVGrowWithinCell; },
/* harmony export */ "getClippingParents": function() { return /* binding */ getClippingParents; },
/* harmony export */ "getDateMeta": function() { return /* binding */ getDateMeta; },
/* harmony export */ "getDayClassNames": function() { return /* binding */ getDayClassNames; },
/* harmony export */ "getDefaultEventEnd": function() { return /* binding */ getDefaultEventEnd; },
/* harmony export */ "getElRoot": function() { return /* binding */ getElRoot; },
/* harmony export */ "getElSeg": function() { return /* binding */ getElSeg; },
/* harmony export */ "getEntrySpanEnd": function() { return /* binding */ getEntrySpanEnd; },
/* harmony export */ "getEventClassNames": function() { return /* binding */ getEventClassNames; },
/* harmony export */ "getEventTargetViaRoot": function() { return /* binding */ getEventTargetViaRoot; },
/* harmony export */ "getIsRtlScrollbarOnLeft": function() { return /* binding */ getIsRtlScrollbarOnLeft; },
/* harmony export */ "getRectCenter": function() { return /* binding */ getRectCenter; },
/* harmony export */ "getRelevantEvents": function() { return /* binding */ getRelevantEvents; },
/* harmony export */ "getScrollGridClassNames": function() { return /* binding */ getScrollGridClassNames; },
/* harmony export */ "getScrollbarWidths": function() { return /* binding */ getScrollbarWidths; },
/* harmony export */ "getSectionClassNames": function() { return /* binding */ getSectionClassNames; },
/* harmony export */ "getSectionHasLiquidHeight": function() { return /* binding */ getSectionHasLiquidHeight; },
/* harmony export */ "getSegAnchorAttrs": function() { return /* binding */ getSegAnchorAttrs; },
/* harmony export */ "getSegMeta": function() { return /* binding */ getSegMeta; },
/* harmony export */ "getSlotClassNames": function() { return /* binding */ getSlotClassNames; },
/* harmony export */ "getStickyFooterScrollbar": function() { return /* binding */ getStickyFooterScrollbar; },
/* harmony export */ "getStickyHeaderDates": function() { return /* binding */ getStickyHeaderDates; },
/* harmony export */ "getUnequalProps": function() { return /* binding */ getUnequalProps; },
/* harmony export */ "getUniqueDomId": function() { return /* binding */ getUniqueDomId; },
/* harmony export */ "globalLocales": function() { return /* binding */ globalLocales; },
/* harmony export */ "globalPlugins": function() { return /* binding */ globalPlugins; },
/* harmony export */ "greatestDurationDenominator": function() { return /* binding */ greatestDurationDenominator; },
/* harmony export */ "groupIntersectingEntries": function() { return /* binding */ groupIntersectingEntries; },
/* harmony export */ "guid": function() { return /* binding */ guid; },
/* harmony export */ "hasBgRendering": function() { return /* binding */ hasBgRendering; },
/* harmony export */ "hasShrinkWidth": function() { return /* binding */ hasShrinkWidth; },
/* harmony export */ "identity": function() { return /* binding */ identity; },
/* harmony export */ "interactionSettingsStore": function() { return /* binding */ interactionSettingsStore; },
/* harmony export */ "interactionSettingsToStore": function() { return /* binding */ interactionSettingsToStore; },
/* harmony export */ "intersectRanges": function() { return /* binding */ intersectRanges; },
/* harmony export */ "intersectRects": function() { return /* binding */ intersectRects; },
/* harmony export */ "intersectSpans": function() { return /* binding */ intersectSpans; },
/* harmony export */ "isArraysEqual": function() { return /* binding */ isArraysEqual; },
/* harmony export */ "isColPropsEqual": function() { return /* binding */ isColPropsEqual; },
/* harmony export */ "isDateSelectionValid": function() { return /* binding */ isDateSelectionValid; },
/* harmony export */ "isDateSpansEqual": function() { return /* binding */ isDateSpansEqual; },
/* harmony export */ "isInt": function() { return /* binding */ isInt; },
/* harmony export */ "isInteractionValid": function() { return /* binding */ isInteractionValid; },
/* harmony export */ "isMultiDayRange": function() { return /* binding */ isMultiDayRange; },
/* harmony export */ "isPropsEqual": function() { return /* binding */ isPropsEqual; },
/* harmony export */ "isPropsValid": function() { return /* binding */ isPropsValid; },
/* harmony export */ "isValidDate": function() { return /* binding */ isValidDate; },
/* harmony export */ "joinSpans": function() { return /* binding */ joinSpans; },
/* harmony export */ "listenBySelector": function() { return /* binding */ listenBySelector; },
/* harmony export */ "mapHash": function() { return /* binding */ mapHash; },
/* harmony export */ "memoize": function() { return /* binding */ memoize; },
/* harmony export */ "memoizeArraylike": function() { return /* binding */ memoizeArraylike; },
/* harmony export */ "memoizeHashlike": function() { return /* binding */ memoizeHashlike; },
/* harmony export */ "memoizeObjArg": function() { return /* binding */ memoizeObjArg; },
/* harmony export */ "mergeEventStores": function() { return /* binding */ mergeEventStores; },
/* harmony export */ "multiplyDuration": function() { return /* binding */ multiplyDuration; },
/* harmony export */ "padStart": function() { return /* binding */ padStart; },
/* harmony export */ "parseBusinessHours": function() { return /* binding */ parseBusinessHours; },
/* harmony export */ "parseClassNames": function() { return /* binding */ parseClassNames; },
/* harmony export */ "parseDragMeta": function() { return /* binding */ parseDragMeta; },
/* harmony export */ "parseEventDef": function() { return /* binding */ parseEventDef; },
/* harmony export */ "parseFieldSpecs": function() { return /* binding */ parseFieldSpecs; },
/* harmony export */ "parseMarker": function() { return /* binding */ parse; },
/* harmony export */ "pointInsideRect": function() { return /* binding */ pointInsideRect; },
/* harmony export */ "preventContextMenu": function() { return /* binding */ preventContextMenu; },
/* harmony export */ "preventDefault": function() { return /* binding */ preventDefault; },
/* harmony export */ "preventSelection": function() { return /* binding */ preventSelection; },
/* harmony export */ "rangeContainsMarker": function() { return /* binding */ rangeContainsMarker; },
/* harmony export */ "rangeContainsRange": function() { return /* binding */ rangeContainsRange; },
/* harmony export */ "rangesEqual": function() { return /* binding */ rangesEqual; },
/* harmony export */ "rangesIntersect": function() { return /* binding */ rangesIntersect; },
/* harmony export */ "refineEventDef": function() { return /* binding */ refineEventDef; },
/* harmony export */ "refineProps": function() { return /* binding */ refineProps; },
/* harmony export */ "removeElement": function() { return /* binding */ removeElement; },
/* harmony export */ "removeExact": function() { return /* binding */ removeExact; },
/* harmony export */ "renderChunkContent": function() { return /* binding */ renderChunkContent; },
/* harmony export */ "renderFill": function() { return /* binding */ renderFill; },
/* harmony export */ "renderMicroColGroup": function() { return /* binding */ renderMicroColGroup; },
/* harmony export */ "renderScrollShim": function() { return /* binding */ renderScrollShim; },
/* harmony export */ "requestJson": function() { return /* binding */ requestJson; },
/* harmony export */ "sanitizeShrinkWidth": function() { return /* binding */ sanitizeShrinkWidth; },
/* harmony export */ "setElSeg": function() { return /* binding */ setElSeg; },
/* harmony export */ "setRef": function() { return /* binding */ setRef; },
/* harmony export */ "sliceEventStore": function() { return /* binding */ sliceEventStore; },
/* harmony export */ "sliceEvents": function() { return /* binding */ sliceEvents; },
/* harmony export */ "sortEventSegs": function() { return /* binding */ sortEventSegs; },
/* harmony export */ "startOfDay": function() { return /* binding */ startOfDay; },
/* harmony export */ "translateRect": function() { return /* binding */ translateRect; },
/* harmony export */ "triggerDateSelect": function() { return /* binding */ triggerDateSelect; },
/* harmony export */ "unpromisify": function() { return /* binding */ unpromisify; },
/* harmony export */ "version": function() { return /* binding */ version; },
/* harmony export */ "whenTransitionDone": function() { return /* binding */ whenTransitionDone; },
/* harmony export */ "wholeDivideDurations": function() { return /* binding */ wholeDivideDurations; }
/* harmony export */ });
/* harmony import */ var _main_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main.css */ "./node_modules/@fullcalendar/common/main.css");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _vdom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vdom.js */ "./node_modules/@fullcalendar/common/vdom.js");
/*!
FullCalendar v5.10.2
Docs & License: https://fullcalendar.io/
(c) 2021 Adam Shaw
*/
// no public types yet. when there are, export from:
// import {} from './api-type-deps'
var EventSourceApi = /** @class */ (function () {
function EventSourceApi(context, internalEventSource) {
this.context = context;
this.internalEventSource = internalEventSource;
}
EventSourceApi.prototype.remove = function () {
this.context.dispatch({
type: 'REMOVE_EVENT_SOURCE',
sourceId: this.internalEventSource.sourceId,
});
};
EventSourceApi.prototype.refetch = function () {
this.context.dispatch({
type: 'FETCH_EVENT_SOURCES',
sourceIds: [this.internalEventSource.sourceId],
isRefetch: true,
});
};
Object.defineProperty(EventSourceApi.prototype, "id", {
get: function () {
return this.internalEventSource.publicId;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventSourceApi.prototype, "url", {
get: function () {
return this.internalEventSource.meta.url;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventSourceApi.prototype, "format", {
get: function () {
return this.internalEventSource.meta.format; // TODO: bad. not guaranteed
},
enumerable: false,
configurable: true
});
return EventSourceApi;
}());
function removeElement(el) {
if (el.parentNode) {
el.parentNode.removeChild(el);
}
}
// Querying
// ----------------------------------------------------------------------------------------------------------------
function elementClosest(el, selector) {
if (el.closest) {
return el.closest(selector);
// really bad fallback for IE
// from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
}
if (!document.documentElement.contains(el)) {
return null;
}
do {
if (elementMatches(el, selector)) {
return el;
}
el = (el.parentElement || el.parentNode);
} while (el !== null && el.nodeType === 1);
return null;
}
function elementMatches(el, selector) {
var method = el.matches || el.matchesSelector || el.msMatchesSelector;
return method.call(el, selector);
}
// accepts multiple subject els
// returns a real array. good for methods like forEach
// TODO: accept the document
function findElements(container, selector) {
var containers = container instanceof HTMLElement ? [container] : container;
var allMatches = [];
for (var i = 0; i < containers.length; i += 1) {
var matches = containers[i].querySelectorAll(selector);
for (var j = 0; j < matches.length; j += 1) {
allMatches.push(matches[j]);
}
}
return allMatches;
}
// accepts multiple subject els
// only queries direct child elements // TODO: rename to findDirectChildren!
function findDirectChildren(parent, selector) {
var parents = parent instanceof HTMLElement ? [parent] : parent;
var allMatches = [];
for (var i = 0; i < parents.length; i += 1) {
var childNodes = parents[i].children; // only ever elements
for (var j = 0; j < childNodes.length; j += 1) {
var childNode = childNodes[j];
if (!selector || elementMatches(childNode, selector)) {
allMatches.push(childNode);
}
}
}
return allMatches;
}
// Style
// ----------------------------------------------------------------------------------------------------------------
var PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i;
function applyStyle(el, props) {
for (var propName in props) {
applyStyleProp(el, propName, props[propName]);
}
}
function applyStyleProp(el, name, val) {
if (val == null) {
el.style[name] = '';
}
else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) {
el.style[name] = val + "px";
}
else {
el.style[name] = val;
}
}
// Event Handling
// ----------------------------------------------------------------------------------------------------------------
// if intercepting bubbled events at the document/window/body level,
// and want to see originating element (the 'target'), use this util instead
// of `ev.target` because it goes within web-component boundaries.
function getEventTargetViaRoot(ev) {
var _a, _b;
return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target;
}
// Shadow DOM consuderations
// ----------------------------------------------------------------------------------------------------------------
function getElRoot(el) {
return el.getRootNode ? el.getRootNode() : document;
}
// Unique ID for DOM attribute
var guid$1 = 0;
function getUniqueDomId() {
guid$1 += 1;
return 'fc-dom-' + guid$1;
}
// Stops a mouse/touch event from doing it's native browser action
function preventDefault(ev) {
ev.preventDefault();
}
// Event Delegation
// ----------------------------------------------------------------------------------------------------------------
function buildDelegationHandler(selector, handler) {
return function (ev) {
var matchedChild = elementClosest(ev.target, selector);
if (matchedChild) {
handler.call(matchedChild, ev, matchedChild);
}
};
}
function listenBySelector(container, eventType, selector, handler) {
var attachedHandler = buildDelegationHandler(selector, handler);
container.addEventListener(eventType, attachedHandler);
return function () {
container.removeEventListener(eventType, attachedHandler);
};
}
function listenToHoverBySelector(container, selector, onMouseEnter, onMouseLeave) {
var currentMatchedChild;
return listenBySelector(container, 'mouseover', selector, function (mouseOverEv, matchedChild) {
if (matchedChild !== currentMatchedChild) {
currentMatchedChild = matchedChild;
onMouseEnter(mouseOverEv, matchedChild);
var realOnMouseLeave_1 = function (mouseLeaveEv) {
currentMatchedChild = null;
onMouseLeave(mouseLeaveEv, matchedChild);
matchedChild.removeEventListener('mouseleave', realOnMouseLeave_1);
};
// listen to the next mouseleave, and then unattach
matchedChild.addEventListener('mouseleave', realOnMouseLeave_1);
}
});
}
// Animation
// ----------------------------------------------------------------------------------------------------------------
var transitionEventNames = [
'webkitTransitionEnd',
'otransitionend',
'oTransitionEnd',
'msTransitionEnd',
'transitionend',
];
// triggered only when the next single subsequent transition finishes
function whenTransitionDone(el, callback) {
var realCallback = function (ev) {
callback(ev);
transitionEventNames.forEach(function (eventName) {
el.removeEventListener(eventName, realCallback);
});
};
transitionEventNames.forEach(function (eventName) {
el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes
});
}
// ARIA workarounds
// ----------------------------------------------------------------------------------------------------------------
function createAriaClickAttrs(handler) {
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ onClick: handler }, createAriaKeyboardAttrs(handler));
}
function createAriaKeyboardAttrs(handler) {
return {
tabIndex: 0,
onKeyDown: function (ev) {
if (ev.key === 'Enter' || ev.key === ' ') {
handler(ev);
ev.preventDefault(); // if space, don't scroll down page
}
},
};
}
var guidNumber = 0;
function guid() {
guidNumber += 1;
return String(guidNumber);
}
/* FullCalendar-specific DOM Utilities
----------------------------------------------------------------------------------------------------------------------*/
// Make the mouse cursor express that an event is not allowed in the current area
function disableCursor() {
document.body.classList.add('fc-not-allowed');
}
// Returns the mouse cursor to its original look
function enableCursor() {
document.body.classList.remove('fc-not-allowed');
}
/* Selection
----------------------------------------------------------------------------------------------------------------------*/
function preventSelection(el) {
el.classList.add('fc-unselectable');
el.addEventListener('selectstart', preventDefault);
}
function allowSelection(el) {
el.classList.remove('fc-unselectable');
el.removeEventListener('selectstart', preventDefault);
}
/* Context Menu
----------------------------------------------------------------------------------------------------------------------*/
function preventContextMenu(el) {
el.addEventListener('contextmenu', preventDefault);
}
function allowContextMenu(el) {
el.removeEventListener('contextmenu', preventDefault);
}
function parseFieldSpecs(input) {
var specs = [];
var tokens = [];
var i;
var token;
if (typeof input === 'string') {
tokens = input.split(/\s*,\s*/);
}
else if (typeof input === 'function') {
tokens = [input];
}
else if (Array.isArray(input)) {
tokens = input;
}
for (i = 0; i < tokens.length; i += 1) {
token = tokens[i];
if (typeof token === 'string') {
specs.push(token.charAt(0) === '-' ?
{ field: token.substring(1), order: -1 } :
{ field: token, order: 1 });
}
else if (typeof token === 'function') {
specs.push({ func: token });
}
}
return specs;
}
function compareByFieldSpecs(obj0, obj1, fieldSpecs) {
var i;
var cmp;
for (i = 0; i < fieldSpecs.length; i += 1) {
cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i]);
if (cmp) {
return cmp;
}
}
return 0;
}
function compareByFieldSpec(obj0, obj1, fieldSpec) {
if (fieldSpec.func) {
return fieldSpec.func(obj0, obj1);
}
return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field])
* (fieldSpec.order || 1);
}
function flexibleCompare(a, b) {
if (!a && !b) {
return 0;
}
if (b == null) {
return -1;
}
if (a == null) {
return 1;
}
if (typeof a === 'string' || typeof b === 'string') {
return String(a).localeCompare(String(b));
}
return a - b;
}
/* String Utilities
----------------------------------------------------------------------------------------------------------------------*/
function padStart(val, len) {
var s = String(val);
return '000'.substr(0, len - s.length) + s;
}
function formatWithOrdinals(formatter, args, fallbackText) {
if (typeof formatter === 'function') {
return formatter.apply(void 0, args);
}
if (typeof formatter === 'string') { // non-blank string
return args.reduce(function (str, arg, index) { return (str.replace('$' + index, arg || '')); }, formatter);
}
return fallbackText;
}
/* Number Utilities
----------------------------------------------------------------------------------------------------------------------*/
function compareNumbers(a, b) {
return a - b;
}
function isInt(n) {
return n % 1 === 0;
}
/* FC-specific DOM dimension stuff
----------------------------------------------------------------------------------------------------------------------*/
function computeSmallestCellWidth(cellEl) {
var allWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-frame');
var contentWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-cushion');
if (!allWidthEl) {
throw new Error('needs fc-scrollgrid-shrink-frame className'); // TODO: use const
}
if (!contentWidthEl) {
throw new Error('needs fc-scrollgrid-shrink-cushion className');
}
return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + // the cell padding+border
contentWidthEl.getBoundingClientRect().width;
}
var DAY_IDS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
// Adding
function addWeeks(m, n) {
var a = dateToUtcArray(m);
a[2] += n * 7;
return arrayToUtcDate(a);
}
function addDays(m, n) {
var a = dateToUtcArray(m);
a[2] += n;
return arrayToUtcDate(a);
}
function addMs(m, n) {
var a = dateToUtcArray(m);
a[6] += n;
return arrayToUtcDate(a);
}
// Diffing (all return floats)
// TODO: why not use ranges?
function diffWeeks(m0, m1) {
return diffDays(m0, m1) / 7;
}
function diffDays(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24);
}
function diffHours(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60);
}
function diffMinutes(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / (1000 * 60);
}
function diffSeconds(m0, m1) {
return (m1.valueOf() - m0.valueOf()) / 1000;
}
function diffDayAndTime(m0, m1) {
var m0day = startOfDay(m0);
var m1day = startOfDay(m1);
return {
years: 0,
months: 0,
days: Math.round(diffDays(m0day, m1day)),
milliseconds: (m1.valueOf() - m1day.valueOf()) - (m0.valueOf() - m0day.valueOf()),
};
}
// Diffing Whole Units
function diffWholeWeeks(m0, m1) {
var d = diffWholeDays(m0, m1);
if (d !== null && d % 7 === 0) {
return d / 7;
}
return null;
}
function diffWholeDays(m0, m1) {
if (timeAsMs(m0) === timeAsMs(m1)) {
return Math.round(diffDays(m0, m1));
}
return null;
}
// Start-Of
function startOfDay(m) {
return arrayToUtcDate([
m.getUTCFullYear(),
m.getUTCMonth(),
m.getUTCDate(),
]);
}
function startOfHour(m) {
return arrayToUtcDate([
m.getUTCFullYear(),
m.getUTCMonth(),
m.getUTCDate(),
m.getUTCHours(),
]);
}
function startOfMinute(m) {
return arrayToUtcDate([
m.getUTCFullYear(),
m.getUTCMonth(),
m.getUTCDate(),
m.getUTCHours(),
m.getUTCMinutes(),
]);
}
function startOfSecond(m) {
return arrayToUtcDate([
m.getUTCFullYear(),
m.getUTCMonth(),
m.getUTCDate(),
m.getUTCHours(),
m.getUTCMinutes(),
m.getUTCSeconds(),
]);
}
// Week Computation
function weekOfYear(marker, dow, doy) {
var y = marker.getUTCFullYear();
var w = weekOfGivenYear(marker, y, dow, doy);
if (w < 1) {
return weekOfGivenYear(marker, y - 1, dow, doy);
}
var nextW = weekOfGivenYear(marker, y + 1, dow, doy);
if (nextW >= 1) {
return Math.min(w, nextW);
}
return w;
}
function weekOfGivenYear(marker, year, dow, doy) {
var firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)]);
var dayStart = startOfDay(marker);
var days = Math.round(diffDays(firstWeekStart, dayStart));
return Math.floor(days / 7) + 1; // zero-indexed
}
// start-of-first-week - start-of-year
function firstWeekOffset(year, dow, doy) {
// first-week day -- which january is always in the first week (4 for iso, 1 for other)
var fwd = 7 + dow - doy;
// first-week day local weekday -- which local weekday is fwd
var fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
// Array Conversion
function dateToLocalArray(date) {
return [
date.getFullYear(),
date.getMonth(),
date.getDate(),
date.getHours(),
date.getMinutes(),
date.getSeconds(),
date.getMilliseconds(),
];
}
function arrayToLocalDate(a) {
return new Date(a[0], a[1] || 0, a[2] == null ? 1 : a[2], // day of month
a[3] || 0, a[4] || 0, a[5] || 0);
}
function dateToUtcArray(date) {
return [
date.getUTCFullYear(),
date.getUTCMonth(),
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
date.getUTCSeconds(),
date.getUTCMilliseconds(),
];
}
function arrayToUtcDate(a) {
// according to web standards (and Safari), a month index is required.
// massage if only given a year.
if (a.length === 1) {
a = a.concat([0]);
}
return new Date(Date.UTC.apply(Date, a));
}
// Other Utils
function isValidDate(m) {
return !isNaN(m.valueOf());
}
function timeAsMs(m) {
return m.getUTCHours() * 1000 * 60 * 60 +
m.getUTCMinutes() * 1000 * 60 +
m.getUTCSeconds() * 1000 +
m.getUTCMilliseconds();
}
function createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) {
return {
instanceId: guid(),
defId: defId,
range: range,
forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo,
forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo,
};
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
// Merges an array of objects into a single object.
// The second argument allows for an array of property names who's object values will be merged together.
function mergeProps(propObjs, complexPropsMap) {
var dest = {};
if (complexPropsMap) {
for (var name_1 in complexPropsMap) {
var complexObjs = [];
// collect the trailing object values, stopping when a non-object is discovered
for (var i = propObjs.length - 1; i >= 0; i -= 1) {
var val = propObjs[i][name_1];
if (typeof val === 'object' && val) { // non-null object
complexObjs.unshift(val);
}
else if (val !== undefined) {
dest[name_1] = val; // if there were no objects, this value will be used
break;
}
}
// if the trailing values were objects, use the merged value
if (complexObjs.length) {
dest[name_1] = mergeProps(complexObjs);
}
}
}
// copy values into the destination, going from last to first
for (var i = propObjs.length - 1; i >= 0; i -= 1) {
var props = propObjs[i];
for (var name_2 in props) {
if (!(name_2 in dest)) { // if already assigned by previous props or complex props, don't reassign
dest[name_2] = props[name_2];
}
}
}
return dest;
}
function filterHash(hash, func) {
var filtered = {};
for (var key in hash) {
if (func(hash[key], key)) {
filtered[key] = hash[key];
}
}
return filtered;
}
function mapHash(hash, func) {
var newHash = {};
for (var key in hash) {
newHash[key] = func(hash[key], key);
}
return newHash;
}
function arrayToHash(a) {
var hash = {};
for (var _i = 0, a_1 = a; _i < a_1.length; _i++) {
var item = a_1[_i];
hash[item] = true;
}
return hash;
}
function buildHashFromArray(a, func) {
var hash = {};
for (var i = 0; i < a.length; i += 1) {
var tuple = func(a[i], i);
hash[tuple[0]] = tuple[1];
}
return hash;
}
function hashValuesToArray(obj) {
var a = [];
for (var key in obj) {
a.push(obj[key]);
}
return a;
}
function isPropsEqual(obj0, obj1) {
if (obj0 === obj1) {
return true;
}
for (var key in obj0) {
if (hasOwnProperty.call(obj0, key)) {
if (!(key in obj1)) {
return false;
}
}
}
for (var key in obj1) {
if (hasOwnProperty.call(obj1, key)) {
if (obj0[key] !== obj1[key]) {
return false;
}
}
}
return true;
}
function getUnequalProps(obj0, obj1) {
var keys = [];
for (var key in obj0) {
if (hasOwnProperty.call(obj0, key)) {
if (!(key in obj1)) {
keys.push(key);
}
}
}
for (var key in obj1) {
if (hasOwnProperty.call(obj1, key)) {
if (obj0[key] !== obj1[key]) {
keys.push(key);
}
}
}
return keys;
}
function compareObjs(oldProps, newProps, equalityFuncs) {
if (equalityFuncs === void 0) { equalityFuncs = {}; }
if (oldProps === newProps) {
return true;
}
for (var key in newProps) {
if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) ;
else {
return false;
}
}
// check for props that were omitted in the new
for (var key in oldProps) {
if (!(key in newProps)) {
return false;
}
}
return true;
}
/*
assumed "true" equality for handler names like "onReceiveSomething"
*/
function isObjValsEqual(val0, val1, comparator) {
if (val0 === val1 || comparator === true) {
return true;
}
if (comparator) {
return comparator(val0, val1);
}
return false;
}
function collectFromHash(hash, startIndex, endIndex, step) {
if (startIndex === void 0) { startIndex = 0; }
if (step === void 0) { step = 1; }
var res = [];
if (endIndex == null) {
endIndex = Object.keys(hash).length;
}
for (var i = startIndex; i < endIndex; i += step) {
var val = hash[i];
if (val !== undefined) { // will disregard undefined for sparse arrays
res.push(val);
}
}
return res;
}
function parseRecurring(refined, defaultAllDay, dateEnv, recurringTypes) {
for (var i = 0; i < recurringTypes.length; i += 1) {
var parsed = recurringTypes[i].parse(refined, dateEnv);
if (parsed) {
var allDay = refined.allDay;
if (allDay == null) {
allDay = defaultAllDay;
if (allDay == null) {
allDay = parsed.allDayGuess;
if (allDay == null) {
allDay = false;
}
}
}
return {
allDay: allDay,
duration: parsed.duration,
typeData: parsed.typeData,
typeId: i,
};
}
}
return null;
}
function expandRecurring(eventStore, framingRange, context) {
var dateEnv = context.dateEnv, pluginHooks = context.pluginHooks, options = context.options;
var defs = eventStore.defs, instances = eventStore.instances;
// remove existing recurring instances
// TODO: bad. always expand events as a second step
instances = filterHash(instances, function (instance) { return !defs[instance.defId].recurringDef; });
for (var defId in defs) {
var def = defs[defId];
if (def.recurringDef) {
var duration = def.recurringDef.duration;
if (!duration) {
duration = def.allDay ?
options.defaultAllDayEventDuration :
options.defaultTimedEventDuration;
}
var starts = expandRecurringRanges(def, duration, framingRange, dateEnv, pluginHooks.recurringTypes);
for (var _i = 0, starts_1 = starts; _i < starts_1.length; _i++) {
var start = starts_1[_i];
var instance = createEventInstance(defId, {
start: start,
end: dateEnv.add(start, duration),
});
instances[instance.instanceId] = instance;
}
}
}
return { defs: defs, instances: instances };
}
/*
Event MUST have a recurringDef
*/
function expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) {
var typeDef = recurringTypes[eventDef.recurringDef.typeId];
var markers = typeDef.expand(eventDef.recurringDef.typeData, {
start: dateEnv.subtract(framingRange.start, duration),
end: framingRange.end,
}, dateEnv);
// the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to
if (eventDef.allDay) {
markers = markers.map(startOfDay);
}
return markers;
}
var INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds'];
var PARSE_RE = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;
// Parsing and Creation
function createDuration(input, unit) {
var _a;
if (typeof input === 'string') {
return parseString(input);
}
if (typeof input === 'object' && input) { // non-null object
return parseObject(input);
}
if (typeof input === 'number') {
return parseObject((_a = {}, _a[unit || 'milliseconds'] = input, _a));
}
return null;
}
function parseString(s) {
var m = PARSE_RE.exec(s);
if (m) {
var sign = m[1] ? -1 : 1;
return {
years: 0,
months: 0,
days: sign * (m[2] ? parseInt(m[2], 10) : 0),
milliseconds: sign * ((m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours
(m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes
(m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds
(m[6] ? parseInt(m[6], 10) : 0) // ms
),
};
}
return null;
}
function parseObject(obj) {
var duration = {
years: obj.years || obj.year || 0,
months: obj.months || obj.month || 0,
days: obj.days || obj.day || 0,
milliseconds: (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours
(obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes
(obj.seconds || obj.second || 0) * 1000 + // seconds
(obj.milliseconds || obj.millisecond || obj.ms || 0), // ms
};
var weeks = obj.weeks || obj.week;
if (weeks) {
duration.days += weeks * 7;
duration.specifiedWeeks = true;
}
return duration;
}
// Equality
function durationsEqual(d0, d1) {
return d0.years === d1.years &&
d0.months === d1.months &&
d0.days === d1.days &&
d0.milliseconds === d1.milliseconds;
}
function asCleanDays(dur) {
if (!dur.years && !dur.months && !dur.milliseconds) {
return dur.days;
}
return 0;
}
// Simple Math
function addDurations(d0, d1) {
return {
years: d0.years + d1.years,
months: d0.months + d1.months,
days: d0.days + d1.days,
milliseconds: d0.milliseconds + d1.milliseconds,
};
}
function subtractDurations(d1, d0) {
return {
years: d1.years - d0.years,
months: d1.months - d0.months,
days: d1.days - d0.days,
milliseconds: d1.milliseconds - d0.milliseconds,
};
}
function multiplyDuration(d, n) {
return {
years: d.years * n,
months: d.months * n,
days: d.days * n,
milliseconds: d.milliseconds * n,
};
}
// Conversions
// "Rough" because they are based on average-case Gregorian months/years
function asRoughYears(dur) {
return asRoughDays(dur) / 365;
}
function asRoughMonths(dur) {
return asRoughDays(dur) / 30;
}
function asRoughDays(dur) {
return asRoughMs(dur) / 864e5;
}
function asRoughMinutes(dur) {
return asRoughMs(dur) / (1000 * 60);
}
function asRoughSeconds(dur) {
return asRoughMs(dur) / 1000;
}
function asRoughMs(dur) {
return dur.years * (365 * 864e5) +
dur.months * (30 * 864e5) +
dur.days * 864e5 +
dur.milliseconds;
}
// Advanced Math
function wholeDivideDurations(numerator, denominator) {
var res = null;
for (var i = 0; i < INTERNAL_UNITS.length; i += 1) {
var unit = INTERNAL_UNITS[i];
if (denominator[unit]) {
var localRes = numerator[unit] / denominator[unit];
if (!isInt(localRes) || (res !== null && res !== localRes)) {
return null;
}
res = localRes;
}
else if (numerator[unit]) {
// needs to divide by something but can't!
return null;
}
}
return res;
}
function greatestDurationDenominator(dur) {
var ms = dur.milliseconds;
if (ms) {
if (ms % 1000 !== 0) {
return { unit: 'millisecond', value: ms };
}
if (ms % (1000 * 60) !== 0) {
return { unit: 'second', value: ms / 1000 };
}
if (ms % (1000 * 60 * 60) !== 0) {
return { unit: 'minute', value: ms / (1000 * 60) };
}
if (ms) {
return { unit: 'hour', value: ms / (1000 * 60 * 60) };
}
}
if (dur.days) {
if (dur.specifiedWeeks && dur.days % 7 === 0) {
return { unit: 'week', value: dur.days / 7 };
}
return { unit: 'day', value: dur.days };
}
if (dur.months) {
return { unit: 'month', value: dur.months };
}
if (dur.years) {
return { unit: 'year', value: dur.years };
}
return { unit: 'millisecond', value: 0 };
}
// timeZoneOffset is in minutes
function buildIsoString(marker, timeZoneOffset, stripZeroTime) {
if (stripZeroTime === void 0) { stripZeroTime = false; }
var s = marker.toISOString();
s = s.replace('.000', '');
if (stripZeroTime) {
s = s.replace('T00:00:00Z', '');
}
if (s.length > 10) { // time part wasn't stripped, can add timezone info
if (timeZoneOffset == null) {
s = s.replace('Z', '');
}
else if (timeZoneOffset !== 0) {
s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true));
}
// otherwise, its UTC-0 and we want to keep the Z
}
return s;
}
// formats the date, but with no time part
// TODO: somehow merge with buildIsoString and stripZeroTime
// TODO: rename. omit "string"
function formatDayString(marker) {
return marker.toISOString().replace(/T.*$/, '');
}
// TODO: use Date::toISOString and use everything after the T?
function formatIsoTimeString(marker) {
return padStart(marker.getUTCHours(), 2) + ':' +
padStart(marker.getUTCMinutes(), 2) + ':' +
padStart(marker.getUTCSeconds(), 2);
}
function formatTimeZoneOffset(minutes, doIso) {
if (doIso === void 0) { doIso = false; }
var sign = minutes < 0 ? '-' : '+';
var abs = Math.abs(minutes);
var hours = Math.floor(abs / 60);
var mins = Math.round(abs % 60);
if (doIso) {
return sign + padStart(hours, 2) + ":" + padStart(mins, 2);
}
return "GMT" + sign + hours + (mins ? ":" + padStart(mins, 2) : '');
}
// TODO: new util arrayify?
function removeExact(array, exactVal) {
var removeCnt = 0;
var i = 0;
while (i < array.length) {
if (array[i] === exactVal) {
array.splice(i, 1);
removeCnt += 1;
}
else {
i += 1;
}
}
return removeCnt;
}
function isArraysEqual(a0, a1, equalityFunc) {
if (a0 === a1) {
return true;
}
var len = a0.length;
var i;
if (len !== a1.length) { // not array? or not same length?
return false;
}
for (i = 0; i < len; i += 1) {
if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) {
return false;
}
}
return true;
}
function memoize(workerFunc, resEquality, teardownFunc) {
var currentArgs;
var currentRes;
return function () {
var newArgs = [];
for (var _i = 0; _i < arguments.length; _i++) {
newArgs[_i] = arguments[_i];
}
if (!currentArgs) {
currentRes = workerFunc.apply(this, newArgs);
}
else if (!isArraysEqual(currentArgs, newArgs)) {
if (teardownFunc) {
teardownFunc(currentRes);
}
var res = workerFunc.apply(this, newArgs);
if (!resEquality || !resEquality(res, currentRes)) {
currentRes = res;
}
}
currentArgs = newArgs;
return currentRes;
};
}
function memoizeObjArg(workerFunc, resEquality, teardownFunc) {
var _this = this;
var currentArg;
var currentRes;
return function (newArg) {
if (!currentArg) {
currentRes = workerFunc.call(_this, newArg);
}
else if (!isPropsEqual(currentArg, newArg)) {
if (teardownFunc) {
teardownFunc(currentRes);
}
var res = workerFunc.call(_this, newArg);
if (!resEquality || !resEquality(res, currentRes)) {
currentRes = res;
}
}
currentArg = newArg;
return currentRes;
};
}
function memoizeArraylike(// used at all?
workerFunc, resEquality, teardownFunc) {
var _this = this;
var currentArgSets = [];
var currentResults = [];
return function (newArgSets) {
var currentLen = currentArgSets.length;
var newLen = newArgSets.length;
var i = 0;
for (; i < currentLen; i += 1) {
if (!newArgSets[i]) { // one of the old sets no longer exists
if (teardownFunc) {
teardownFunc(currentResults[i]);
}
}
else if (!isArraysEqual(currentArgSets[i], newArgSets[i])) {
if (teardownFunc) {
teardownFunc(currentResults[i]);
}
var res = workerFunc.apply(_this, newArgSets[i]);
if (!resEquality || !resEquality(res, currentResults[i])) {
currentResults[i] = res;
}
}
}
for (; i < newLen; i += 1) {
currentResults[i] = workerFunc.apply(_this, newArgSets[i]);
}
currentArgSets = newArgSets;
currentResults.splice(newLen); // remove excess
return currentResults;
};
}
function memoizeHashlike(// used?
workerFunc, resEquality, teardownFunc) {
var _this = this;
var currentArgHash = {};
var currentResHash = {};
return function (newArgHash) {
var newResHash = {};
for (var key in newArgHash) {
if (!currentResHash[key]) {
newResHash[key] = workerFunc.apply(_this, newArgHash[key]);
}
else if (!isArraysEqual(currentArgHash[key], newArgHash[key])) {
if (teardownFunc) {
teardownFunc(currentResHash[key]);
}
var res = workerFunc.apply(_this, newArgHash[key]);
newResHash[key] = (resEquality && resEquality(res, currentResHash[key]))
? currentResHash[key]
: res;
}
else {
newResHash[key] = currentResHash[key];
}
}
currentArgHash = newArgHash;
currentResHash = newResHash;
return newResHash;
};
}
var EXTENDED_SETTINGS_AND_SEVERITIES = {
week: 3,
separator: 0,
omitZeroMinute: 0,
meridiem: 0,
omitCommas: 0,
};
var STANDARD_DATE_PROP_SEVERITIES = {
timeZoneName: 7,
era: 6,
year: 5,
month: 4,
day: 2,
weekday: 2,
hour: 1,
minute: 1,
second: 1,
};
var MERIDIEM_RE = /\s*([ap])\.?m\.?/i; // eats up leading spaces too
var COMMA_RE = /,/g; // we need re for globalness
var MULTI_SPACE_RE = /\s+/g;
var LTR_RE = /\u200e/g; // control character
var UTC_RE = /UTC|GMT/;
var NativeFormatter = /** @class */ (function () {
function NativeFormatter(formatSettings) {
var standardDateProps = {};
var extendedSettings = {};
var severity = 0;
for (var name_1 in formatSettings) {
if (name_1 in EXTENDED_SETTINGS_AND_SEVERITIES) {
extendedSettings[name_1] = formatSettings[name_1];
severity = Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[name_1], severity);
}
else {
standardDateProps[name_1] = formatSettings[name_1];
if (name_1 in STANDARD_DATE_PROP_SEVERITIES) { // TODO: what about hour12? no severity
severity = Math.max(STANDARD_DATE_PROP_SEVERITIES[name_1], severity);
}
}
}
this.standardDateProps = standardDateProps;
this.extendedSettings = extendedSettings;
this.severity = severity;
this.buildFormattingFunc = memoize(buildFormattingFunc);
}
NativeFormatter.prototype.format = function (date, context) {
return this.buildFormattingFunc(this.standardDateProps, this.extendedSettings, context)(date);
};
NativeFormatter.prototype.formatRange = function (start, end, context, betterDefaultSeparator) {
var _a = this, standardDateProps = _a.standardDateProps, extendedSettings = _a.extendedSettings;
var diffSeverity = computeMarkerDiffSeverity(start.marker, end.marker, context.calendarSystem);
if (!diffSeverity) {
return this.format(start, context);
}
var biggestUnitForPartial = diffSeverity;
if (biggestUnitForPartial > 1 && // the two dates are different in a way that's larger scale than time
(standardDateProps.year === 'numeric' || standardDateProps.year === '2-digit') &&
(standardDateProps.month === 'numeric' || standardDateProps.month === '2-digit') &&
(standardDateProps.day === 'numeric' || standardDateProps.day === '2-digit')) {
biggestUnitForPartial = 1; // make it look like the dates are only different in terms of time
}
var full0 = this.format(start, context);
var full1 = this.format(end, context);
if (full0 === full1) {
return full0;
}
var partialDateProps = computePartialFormattingOptions(standardDateProps, biggestUnitForPartial);
var partialFormattingFunc = buildFormattingFunc(partialDateProps, extendedSettings, context);
var partial0 = partialFormattingFunc(start);
var partial1 = partialFormattingFunc(end);
var insertion = findCommonInsertion(full0, partial0, full1, partial1);
var separator = extendedSettings.separator || betterDefaultSeparator || context.defaultSeparator || '';
if (insertion) {
return insertion.before + partial0 + separator + partial1 + insertion.after;
}
return full0 + separator + full1;
};
NativeFormatter.prototype.getLargestUnit = function () {
switch (this.severity) {
case 7:
case 6:
case 5:
return 'year';
case 4:
return 'month';
case 3:
return 'week';
case 2:
return 'day';
default:
return 'time'; // really?
}
};
return NativeFormatter;
}());
function buildFormattingFunc(standardDateProps, extendedSettings, context) {
var standardDatePropCnt = Object.keys(standardDateProps).length;
if (standardDatePropCnt === 1 && standardDateProps.timeZoneName === 'short') {
return function (date) { return (formatTimeZoneOffset(date.timeZoneOffset)); };
}
if (standardDatePropCnt === 0 && extendedSettings.week) {
return function (date) { return (formatWeekNumber(context.computeWeekNumber(date.marker), context.weekText, context.weekTextLong, context.locale, extendedSettings.week)); };
}
return buildNativeFormattingFunc(standardDateProps, extendedSettings, context);
}
function buildNativeFormattingFunc(standardDateProps, extendedSettings, context) {
standardDateProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, standardDateProps); // copy
extendedSettings = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, extendedSettings); // copy
sanitizeSettings(standardDateProps, extendedSettings);
standardDateProps.timeZone = 'UTC'; // we leverage the only guaranteed timeZone for our UTC markers
var normalFormat = new Intl.DateTimeFormat(context.locale.codes, standardDateProps);
var zeroFormat; // needed?
if (extendedSettings.omitZeroMinute) {
var zeroProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, standardDateProps);
delete zeroProps.minute; // seconds and ms were already considered in sanitizeSettings
zeroFormat = new Intl.DateTimeFormat(context.locale.codes, zeroProps);
}
return function (date) {
var marker = date.marker;
var format;
if (zeroFormat && !marker.getUTCMinutes()) {
format = zeroFormat;
}
else {
format = normalFormat;
}
var s = format.format(marker);
return postProcess(s, date, standardDateProps, extendedSettings, context);
};
}
function sanitizeSettings(standardDateProps, extendedSettings) {
// deal with a browser inconsistency where formatting the timezone
// requires that the hour/minute be present.
if (standardDateProps.timeZoneName) {
if (!standardDateProps.hour) {
standardDateProps.hour = '2-digit';
}
if (!standardDateProps.minute) {
standardDateProps.minute = '2-digit';
}
}
// only support short timezone names
if (standardDateProps.timeZoneName === 'long') {
standardDateProps.timeZoneName = 'short';
}
// if requesting to display seconds, MUST display minutes
if (extendedSettings.omitZeroMinute && (standardDateProps.second || standardDateProps.millisecond)) {
delete extendedSettings.omitZeroMinute;
}
}
function postProcess(s, date, standardDateProps, extendedSettings, context) {
s = s.replace(LTR_RE, ''); // remove left-to-right control chars. do first. good for other regexes
if (standardDateProps.timeZoneName === 'short') {
s = injectTzoStr(s, (context.timeZone === 'UTC' || date.timeZoneOffset == null) ?
'UTC' : // important to normalize for IE, which does "GMT"
formatTimeZoneOffset(date.timeZoneOffset));
}
if (extendedSettings.omitCommas) {
s = s.replace(COMMA_RE, '').trim();
}
if (extendedSettings.omitZeroMinute) {
s = s.replace(':00', ''); // zeroFormat doesn't always achieve this
}
// ^ do anything that might create adjacent spaces before this point,
// because MERIDIEM_RE likes to eat up loading spaces
if (extendedSettings.meridiem === false) {
s = s.replace(MERIDIEM_RE, '').trim();
}
else if (extendedSettings.meridiem === 'narrow') { // a/p
s = s.replace(MERIDIEM_RE, function (m0, m1) { return m1.toLocaleLowerCase(); });
}
else if (extendedSettings.meridiem === 'short') { // am/pm
s = s.replace(MERIDIEM_RE, function (m0, m1) { return m1.toLocaleLowerCase() + "m"; });
}
else if (extendedSettings.meridiem === 'lowercase') { // other meridiem transformers already converted to lowercase
s = s.replace(MERIDIEM_RE, function (m0) { return m0.toLocaleLowerCase(); });
}
s = s.replace(MULTI_SPACE_RE, ' ');
s = s.trim();
return s;
}
function injectTzoStr(s, tzoStr) {
var replaced = false;
s = s.replace(UTC_RE, function () {
replaced = true;
return tzoStr;
});
// IE11 doesn't include UTC/GMT in the original string, so append to end
if (!replaced) {
s += " " + tzoStr;
}
return s;
}
function formatWeekNumber(num, weekText, weekTextLong, locale, display) {
var parts = [];
if (display === 'long') {
parts.push(weekTextLong);
}
else if (display === 'short' || display === 'narrow') {
parts.push(weekText);
}
if (display === 'long' || display === 'short') {
parts.push(' ');
}
parts.push(locale.simpleNumberFormat.format(num));
if (locale.options.direction === 'rtl') { // TODO: use control characters instead?
parts.reverse();
}
return parts.join('');
}
// Range Formatting Utils
// 0 = exactly the same
// 1 = different by time
// and bigger
function computeMarkerDiffSeverity(d0, d1, ca) {
if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) {
return 5;
}
if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) {
return 4;
}
if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) {
return 2;
}
if (timeAsMs(d0) !== timeAsMs(d1)) {
return 1;
}
return 0;
}
function computePartialFormattingOptions(options, biggestUnit) {
var partialOptions = {};
for (var name_2 in options) {
if (!(name_2 in STANDARD_DATE_PROP_SEVERITIES) || // not a date part prop (like timeZone)
STANDARD_DATE_PROP_SEVERITIES[name_2] <= biggestUnit) {
partialOptions[name_2] = options[name_2];
}
}
return partialOptions;
}
function findCommonInsertion(full0, partial0, full1, partial1) {
var i0 = 0;
while (i0 < full0.length) {
var found0 = full0.indexOf(partial0, i0);
if (found0 === -1) {
break;
}
var before0 = full0.substr(0, found0);
i0 = found0 + partial0.length;
var after0 = full0.substr(i0);
var i1 = 0;
while (i1 < full1.length) {
var found1 = full1.indexOf(partial1, i1);
if (found1 === -1) {
break;
}
var before1 = full1.substr(0, found1);
i1 = found1 + partial1.length;
var after1 = full1.substr(i1);
if (before0 === before1 && after0 === after1) {
return {
before: before0,
after: after0,
};
}
}
}
return null;
}
function expandZonedMarker(dateInfo, calendarSystem) {
var a = calendarSystem.markerToArray(dateInfo.marker);
return {
marker: dateInfo.marker,
timeZoneOffset: dateInfo.timeZoneOffset,
array: a,
year: a[0],
month: a[1],
day: a[2],
hour: a[3],
minute: a[4],
second: a[5],
millisecond: a[6],
};
}
function createVerboseFormattingArg(start, end, context, betterDefaultSeparator) {
var startInfo = expandZonedMarker(start, context.calendarSystem);
var endInfo = end ? expandZonedMarker(end, context.calendarSystem) : null;
return {
date: startInfo,
start: startInfo,
end: endInfo,
timeZone: context.timeZone,
localeCodes: context.locale.codes,
defaultSeparator: betterDefaultSeparator || context.defaultSeparator,
};
}
/*
TODO: fix the terminology of "formatter" vs "formatting func"
*/
/*
At the time of instantiation, this object does not know which cmd-formatting system it will use.
It receives this at the time of formatting, as a setting.
*/
var CmdFormatter = /** @class */ (function () {
function CmdFormatter(cmdStr) {
this.cmdStr = cmdStr;
}
CmdFormatter.prototype.format = function (date, context, betterDefaultSeparator) {
return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(date, null, context, betterDefaultSeparator));
};
CmdFormatter.prototype.formatRange = function (start, end, context, betterDefaultSeparator) {
return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(start, end, context, betterDefaultSeparator));
};
return CmdFormatter;
}());
var FuncFormatter = /** @class */ (function () {
function FuncFormatter(func) {
this.func = func;
}
FuncFormatter.prototype.format = function (date, context, betterDefaultSeparator) {
return this.func(createVerboseFormattingArg(date, null, context, betterDefaultSeparator));
};
FuncFormatter.prototype.formatRange = function (start, end, context, betterDefaultSeparator) {
return this.func(createVerboseFormattingArg(start, end, context, betterDefaultSeparator));
};
return FuncFormatter;
}());
function createFormatter(input) {
if (typeof input === 'object' && input) { // non-null object
return new NativeFormatter(input);
}
if (typeof input === 'string') {
return new CmdFormatter(input);
}
if (typeof input === 'function') {
return new FuncFormatter(input);
}
return null;
}
// base options
// ------------
var BASE_OPTION_REFINERS = {
navLinkDayClick: identity,
navLinkWeekClick: identity,
duration: createDuration,
bootstrapFontAwesome: identity,
buttonIcons: identity,
customButtons: identity,
defaultAllDayEventDuration: createDuration,
defaultTimedEventDuration: createDuration,
nextDayThreshold: createDuration,
scrollTime: createDuration,
scrollTimeReset: Boolean,
slotMinTime: createDuration,
slotMaxTime: createDuration,
dayPopoverFormat: createFormatter,
slotDuration: createDuration,
snapDuration: createDuration,
headerToolbar: identity,
footerToolbar: identity,
defaultRangeSeparator: String,
titleRangeSeparator: String,
forceEventDuration: Boolean,
dayHeaders: Boolean,
dayHeaderFormat: createFormatter,
dayHeaderClassNames: identity,
dayHeaderContent: identity,
dayHeaderDidMount: identity,
dayHeaderWillUnmount: identity,
dayCellClassNames: identity,
dayCellContent: identity,
dayCellDidMount: identity,
dayCellWillUnmount: identity,
initialView: String,
aspectRatio: Number,
weekends: Boolean,
weekNumberCalculation: identity,
weekNumbers: Boolean,
weekNumberClassNames: identity,
weekNumberContent: identity,
weekNumberDidMount: identity,
weekNumberWillUnmount: identity,
editable: Boolean,
viewClassNames: identity,
viewDidMount: identity,
viewWillUnmount: identity,
nowIndicator: Boolean,
nowIndicatorClassNames: identity,
nowIndicatorContent: identity,
nowIndicatorDidMount: identity,
nowIndicatorWillUnmount: identity,
showNonCurrentDates: Boolean,
lazyFetching: Boolean,
startParam: String,
endParam: String,
timeZoneParam: String,
timeZone: String,
locales: identity,
locale: identity,
themeSystem: String,
dragRevertDuration: Number,
dragScroll: Boolean,
allDayMaintainDuration: Boolean,
unselectAuto: Boolean,
dropAccept: identity,
eventOrder: parseFieldSpecs,
eventOrderStrict: Boolean,
handleWindowResize: Boolean,
windowResizeDelay: Number,
longPressDelay: Number,
eventDragMinDistance: Number,
expandRows: Boolean,
height: identity,
contentHeight: identity,
direction: String,
weekNumberFormat: createFormatter,
eventResizableFromStart: Boolean,
displayEventTime: Boolean,
displayEventEnd: Boolean,
weekText: String,
weekTextLong: String,
progressiveEventRendering: Boolean,
businessHours: identity,
initialDate: identity,
now: identity,
eventDataTransform: identity,
stickyHeaderDates: identity,
stickyFooterScrollbar: identity,
viewHeight: identity,
defaultAllDay: Boolean,
eventSourceFailure: identity,
eventSourceSuccess: identity,
eventDisplay: String,
eventStartEditable: Boolean,
eventDurationEditable: Boolean,
eventOverlap: identity,
eventConstraint: identity,
eventAllow: identity,
eventBackgroundColor: String,
eventBorderColor: String,
eventTextColor: String,
eventColor: String,
eventClassNames: identity,
eventContent: identity,
eventDidMount: identity,
eventWillUnmount: identity,
selectConstraint: identity,
selectOverlap: identity,
selectAllow: identity,
droppable: Boolean,
unselectCancel: String,
slotLabelFormat: identity,
slotLaneClassNames: identity,
slotLaneContent: identity,
slotLaneDidMount: identity,
slotLaneWillUnmount: identity,
slotLabelClassNames: identity,
slotLabelContent: identity,
slotLabelDidMount: identity,
slotLabelWillUnmount: identity,
dayMaxEvents: identity,
dayMaxEventRows: identity,
dayMinWidth: Number,
slotLabelInterval: createDuration,
allDayText: String,
allDayClassNames: identity,
allDayContent: identity,
allDayDidMount: identity,
allDayWillUnmount: identity,
slotMinWidth: Number,
navLinks: Boolean,
eventTimeFormat: createFormatter,
rerenderDelay: Number,
moreLinkText: identity,
moreLinkHint: identity,
selectMinDistance: Number,
selectable: Boolean,
selectLongPressDelay: Number,
eventLongPressDelay: Number,
selectMirror: Boolean,
eventMaxStack: Number,
eventMinHeight: Number,
eventMinWidth: Number,
eventShortHeight: Number,
slotEventOverlap: Boolean,
plugins: identity,
firstDay: Number,
dayCount: Number,
dateAlignment: String,
dateIncrement: createDuration,
hiddenDays: identity,
monthMode: Boolean,
fixedWeekCount: Boolean,
validRange: identity,
visibleRange: identity,
titleFormat: identity,
eventInteractive: Boolean,
// only used by list-view, but languages define the value, so we need it in base options
noEventsText: String,
viewHint: identity,
navLinkHint: identity,
closeHint: String,
timeHint: String,
eventHint: String,
moreLinkClick: identity,
moreLinkClassNames: identity,
moreLinkContent: identity,
moreLinkDidMount: identity,
moreLinkWillUnmount: identity,
};
// do NOT give a type here. need `typeof BASE_OPTION_DEFAULTS` to give real results.
// raw values.
var BASE_OPTION_DEFAULTS = {
eventDisplay: 'auto',
defaultRangeSeparator: ' - ',
titleRangeSeparator: ' \u2013 ',
defaultTimedEventDuration: '01:00:00',
defaultAllDayEventDuration: { day: 1 },
forceEventDuration: false,
nextDayThreshold: '00:00:00',
dayHeaders: true,
initialView: '',
aspectRatio: 1.35,
headerToolbar: {
start: 'title',
center: '',
end: 'today prev,next',
},
weekends: true,
weekNumbers: false,
weekNumberCalculation: 'local',
editable: false,
nowIndicator: false,
scrollTime: '06:00:00',
scrollTimeReset: true,
slotMinTime: '00:00:00',
slotMaxTime: '24:00:00',
showNonCurrentDates: true,
lazyFetching: true,
startParam: 'start',
endParam: 'end',
timeZoneParam: 'timeZone',
timeZone: 'local',
locales: [],
locale: '',
themeSystem: 'standard',
dragRevertDuration: 500,
dragScroll: true,
allDayMaintainDuration: false,
unselectAuto: true,
dropAccept: '*',
eventOrder: 'start,-duration,allDay,title',
dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },
handleWindowResize: true,
windowResizeDelay: 100,
longPressDelay: 1000,
eventDragMinDistance: 5,
expandRows: false,
navLinks: false,
selectable: false,
eventMinHeight: 15,
eventMinWidth: 30,
eventShortHeight: 30,
};
// calendar listeners
// ------------------
var CALENDAR_LISTENER_REFINERS = {
datesSet: identity,
eventsSet: identity,
eventAdd: identity,
eventChange: identity,
eventRemove: identity,
windowResize: identity,
eventClick: identity,
eventMouseEnter: identity,
eventMouseLeave: identity,
select: identity,
unselect: identity,
loading: identity,
// internal
_unmount: identity,
_beforeprint: identity,
_afterprint: identity,
_noEventDrop: identity,
_noEventResize: identity,
_resize: identity,
_scrollRequest: identity,
};
// calendar-specific options
// -------------------------
var CALENDAR_OPTION_REFINERS = {
buttonText: identity,
buttonHints: identity,
views: identity,
plugins: identity,
initialEvents: identity,
events: identity,
eventSources: identity,
};
var COMPLEX_OPTION_COMPARATORS = {
headerToolbar: isBoolComplexEqual,
footerToolbar: isBoolComplexEqual,
buttonText: isBoolComplexEqual,
buttonHints: isBoolComplexEqual,
buttonIcons: isBoolComplexEqual,
};
function isBoolComplexEqual(a, b) {
if (typeof a === 'object' && typeof b === 'object' && a && b) { // both non-null objects
return isPropsEqual(a, b);
}
return a === b;
}
// view-specific options
// ---------------------
var VIEW_OPTION_REFINERS = {
type: String,
component: identity,
buttonText: String,
buttonTextKey: String,
dateProfileGeneratorClass: identity,
usesMinMaxTime: Boolean,
classNames: identity,
content: identity,
didMount: identity,
willUnmount: identity,
};
// util funcs
// ----------------------------------------------------------------------------------------------------
function mergeRawOptions(optionSets) {
return mergeProps(optionSets, COMPLEX_OPTION_COMPARATORS);
}
function refineProps(input, refiners) {
var refined = {};
var extra = {};
for (var propName in refiners) {
if (propName in input) {
refined[propName] = refiners[propName](input[propName]);
}
}
for (var propName in input) {
if (!(propName in refiners)) {
extra[propName] = input[propName];
}
}
return { refined: refined, extra: extra };
}
function identity(raw) {
return raw;
}
function parseEvents(rawEvents, eventSource, context, allowOpenRange) {
var eventStore = createEmptyEventStore();
var eventRefiners = buildEventRefiners(context);
for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) {
var rawEvent = rawEvents_1[_i];
var tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners);
if (tuple) {
eventTupleToStore(tuple, eventStore);
}
}
return eventStore;
}
function eventTupleToStore(tuple, eventStore) {
if (eventStore === void 0) { eventStore = createEmptyEventStore(); }
eventStore.defs[tuple.def.defId] = tuple.def;
if (tuple.instance) {
eventStore.instances[tuple.instance.instanceId] = tuple.instance;
}
return eventStore;
}
// retrieves events that have the same groupId as the instance specified by `instanceId`
// or they are the same as the instance.
// why might instanceId not be in the store? an event from another calendar?
function getRelevantEvents(eventStore, instanceId) {
var instance = eventStore.instances[instanceId];
if (instance) {
var def_1 = eventStore.defs[instance.defId];
// get events/instances with same group
var newStore = filterEventStoreDefs(eventStore, function (lookDef) { return isEventDefsGrouped(def_1, lookDef); });
// add the original
// TODO: wish we could use eventTupleToStore or something like it
newStore.defs[def_1.defId] = def_1;
newStore.instances[instance.instanceId] = instance;
return newStore;
}
return createEmptyEventStore();
}
function isEventDefsGrouped(def0, def1) {
return Boolean(def0.groupId && def0.groupId === def1.groupId);
}
function createEmptyEventStore() {
return { defs: {}, instances: {} };
}
function mergeEventStores(store0, store1) {
return {
defs: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, store0.defs), store1.defs),
instances: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, store0.instances), store1.instances),
};
}
function filterEventStoreDefs(eventStore, filterFunc) {
var defs = filterHash(eventStore.defs, filterFunc);
var instances = filterHash(eventStore.instances, function (instance) { return (defs[instance.defId] // still exists?
); });
return { defs: defs, instances: instances };
}
function excludeSubEventStore(master, sub) {
var defs = master.defs, instances = master.instances;
var filteredDefs = {};
var filteredInstances = {};
for (var defId in defs) {
if (!sub.defs[defId]) { // not explicitly excluded
filteredDefs[defId] = defs[defId];
}
}
for (var instanceId in instances) {
if (!sub.instances[instanceId] && // not explicitly excluded
filteredDefs[instances[instanceId].defId] // def wasn't filtered away
) {
filteredInstances[instanceId] = instances[instanceId];
}
}
return {
defs: filteredDefs,
instances: filteredInstances,
};
}
function normalizeConstraint(input, context) {
if (Array.isArray(input)) {
return parseEvents(input, null, context, true); // allowOpenRange=true
}
if (typeof input === 'object' && input) { // non-null object
return parseEvents([input], null, context, true); // allowOpenRange=true
}
if (input != null) {
return String(input);
}
return null;
}
function parseClassNames(raw) {
if (Array.isArray(raw)) {
return raw;
}
if (typeof raw === 'string') {
return raw.split(/\s+/);
}
return [];
}
// TODO: better called "EventSettings" or "EventConfig"
// TODO: move this file into structs
// TODO: separate constraint/overlap/allow, because selection uses only that, not other props
var EVENT_UI_REFINERS = {
display: String,
editable: Boolean,
startEditable: Boolean,
durationEditable: Boolean,
constraint: identity,
overlap: identity,
allow: identity,
className: parseClassNames,
classNames: parseClassNames,
color: String,
backgroundColor: String,
borderColor: String,
textColor: String,
};
var EMPTY_EVENT_UI = {
display: null,
startEditable: null,
durationEditable: null,
constraints: [],
overlap: null,
allows: [],
backgroundColor: '',
borderColor: '',
textColor: '',
classNames: [],
};
function createEventUi(refined, context) {
var constraint = normalizeConstraint(refined.constraint, context);
return {
display: refined.display || null,
startEditable: refined.startEditable != null ? refined.startEditable : refined.editable,
durationEditable: refined.durationEditable != null ? refined.durationEditable : refined.editable,
constraints: constraint != null ? [constraint] : [],
overlap: refined.overlap != null ? refined.overlap : null,
allows: refined.allow != null ? [refined.allow] : [],
backgroundColor: refined.backgroundColor || refined.color || '',
borderColor: refined.borderColor || refined.color || '',
textColor: refined.textColor || '',
classNames: (refined.className || []).concat(refined.classNames || []), // join singular and plural
};
}
// TODO: prevent against problems with <2 args!
function combineEventUis(uis) {
return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI);
}
function combineTwoEventUis(item0, item1) {
return {
display: item1.display != null ? item1.display : item0.display,
startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,
durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,
constraints: item0.constraints.concat(item1.constraints),
overlap: typeof item1.overlap === 'boolean' ? item1.overlap : item0.overlap,
allows: item0.allows.concat(item1.allows),
backgroundColor: item1.backgroundColor || item0.backgroundColor,
borderColor: item1.borderColor || item0.borderColor,
textColor: item1.textColor || item0.textColor,
classNames: item0.classNames.concat(item1.classNames),
};
}
var EVENT_NON_DATE_REFINERS = {
id: String,
groupId: String,
title: String,
url: String,
interactive: Boolean,
};
var EVENT_DATE_REFINERS = {
start: identity,
end: identity,
date: identity,
allDay: Boolean,
};
var EVENT_REFINERS = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, EVENT_NON_DATE_REFINERS), EVENT_DATE_REFINERS), { extendedProps: identity });
function parseEvent(raw, eventSource, context, allowOpenRange, refiners) {
if (refiners === void 0) { refiners = buildEventRefiners(context); }
var _a = refineEventDef(raw, context, refiners), refined = _a.refined, extra = _a.extra;
var defaultAllDay = computeIsDefaultAllDay(eventSource, context);
var recurringRes = parseRecurring(refined, defaultAllDay, context.dateEnv, context.pluginHooks.recurringTypes);
if (recurringRes) {
var def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', recurringRes.allDay, Boolean(recurringRes.duration), context);
def.recurringDef = {
typeId: recurringRes.typeId,
typeData: recurringRes.typeData,
duration: recurringRes.duration,
};
return { def: def, instance: null };
}
var singleRes = parseSingle(refined, defaultAllDay, context, allowOpenRange);
if (singleRes) {
var def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context);
var instance = createEventInstance(def.defId, singleRes.range, singleRes.forcedStartTzo, singleRes.forcedEndTzo);
return { def: def, instance: instance };
}
return null;
}
function refineEventDef(raw, context, refiners) {
if (refiners === void 0) { refiners = buildEventRefiners(context); }
return refineProps(raw, refiners);
}
function buildEventRefiners(context) {
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, EVENT_UI_REFINERS), EVENT_REFINERS), context.pluginHooks.eventRefiners);
}
/*
Will NOT populate extendedProps with the leftover properties.
Will NOT populate date-related props.
*/
function parseEventDef(refined, extra, sourceId, allDay, hasEnd, context) {
var def = {
title: refined.title || '',
groupId: refined.groupId || '',
publicId: refined.id || '',
url: refined.url || '',
recurringDef: null,
defId: guid(),
sourceId: sourceId,
allDay: allDay,
hasEnd: hasEnd,
interactive: refined.interactive,
ui: createEventUi(refined, context),
extendedProps: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, (refined.extendedProps || {})), extra),
};
for (var _i = 0, _a = context.pluginHooks.eventDefMemberAdders; _i < _a.length; _i++) {
var memberAdder = _a[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(def, memberAdder(refined));
}
// help out EventApi from having user modify props
Object.freeze(def.ui.classNames);
Object.freeze(def.extendedProps);
return def;
}
function parseSingle(refined, defaultAllDay, context, allowOpenRange) {
var allDay = refined.allDay;
var startMeta;
var startMarker = null;
var hasEnd = false;
var endMeta;
var endMarker = null;
var startInput = refined.start != null ? refined.start : refined.date;
startMeta = context.dateEnv.createMarkerMeta(startInput);
if (startMeta) {
startMarker = startMeta.marker;
}
else if (!allowOpenRange) {
return null;
}
if (refined.end != null) {
endMeta = context.dateEnv.createMarkerMeta(refined.end);
}
if (allDay == null) {
if (defaultAllDay != null) {
allDay = defaultAllDay;
}
else {
// fall back to the date props LAST
allDay = (!startMeta || startMeta.isTimeUnspecified) &&
(!endMeta || endMeta.isTimeUnspecified);
}
}
if (allDay && startMarker) {
startMarker = startOfDay(startMarker);
}
if (endMeta) {
endMarker = endMeta.marker;
if (allDay) {
endMarker = startOfDay(endMarker);
}
if (startMarker && endMarker <= startMarker) {
endMarker = null;
}
}
if (endMarker) {
hasEnd = true;
}
else if (!allowOpenRange) {
hasEnd = context.options.forceEventDuration || false;
endMarker = context.dateEnv.add(startMarker, allDay ?
context.options.defaultAllDayEventDuration :
context.options.defaultTimedEventDuration);
}
return {
allDay: allDay,
hasEnd: hasEnd,
range: { start: startMarker, end: endMarker },
forcedStartTzo: startMeta ? startMeta.forcedTzo : null,
forcedEndTzo: endMeta ? endMeta.forcedTzo : null,
};
}
function computeIsDefaultAllDay(eventSource, context) {
var res = null;
if (eventSource) {
res = eventSource.defaultAllDay;
}
if (res == null) {
res = context.options.defaultAllDay;
}
return res;
}
/* Date stuff that doesn't belong in datelib core
----------------------------------------------------------------------------------------------------------------------*/
// given a timed range, computes an all-day range that has the same exact duration,
// but whose start time is aligned with the start of the day.
function computeAlignedDayRange(timedRange) {
var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;
var start = startOfDay(timedRange.start);
var end = addDays(start, dayCnt);
return { start: start, end: end };
}
// given a timed range, computes an all-day range based on how for the end date bleeds into the next day
// TODO: give nextDayThreshold a default arg
function computeVisibleDayRange(timedRange, nextDayThreshold) {
if (nextDayThreshold === void 0) { nextDayThreshold = createDuration(0); }
var startDay = null;
var endDay = null;
if (timedRange.end) {
endDay = startOfDay(timedRange.end);
var endTimeMS = timedRange.end.valueOf() - endDay.valueOf(); // # of milliseconds into `endDay`
// If the end time is actually inclusively part of the next day and is equal to or
// beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.
// Otherwise, leaving it as inclusive will cause it to exclude `endDay`.
if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) {
endDay = addDays(endDay, 1);
}
}
if (timedRange.start) {
startDay = startOfDay(timedRange.start); // the beginning of the day the range starts
// If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.
if (endDay && endDay <= startDay) {
endDay = addDays(startDay, 1);
}
}
return { start: startDay, end: endDay };
}
// spans from one day into another?
function isMultiDayRange(range) {
var visibleRange = computeVisibleDayRange(range);
return diffDays(visibleRange.start, visibleRange.end) > 1;
}
function diffDates(date0, date1, dateEnv, largeUnit) {
if (largeUnit === 'year') {
return createDuration(dateEnv.diffWholeYears(date0, date1), 'year');
}
if (largeUnit === 'month') {
return createDuration(dateEnv.diffWholeMonths(date0, date1), 'month');
}
return diffDayAndTime(date0, date1); // returns a duration
}
function parseRange(input, dateEnv) {
var start = null;
var end = null;
if (input.start) {
start = dateEnv.createMarker(input.start);
}
if (input.end) {
end = dateEnv.createMarker(input.end);
}
if (!start && !end) {
return null;
}
if (start && end && end < start) {
return null;
}
return { start: start, end: end };
}
// SIDE-EFFECT: will mutate ranges.
// Will return a new array result.
function invertRanges(ranges, constraintRange) {
var invertedRanges = [];
var start = constraintRange.start; // the end of the previous range. the start of the new range
var i;
var dateRange;
// ranges need to be in order. required for our date-walking algorithm
ranges.sort(compareRanges);
for (i = 0; i < ranges.length; i += 1) {
dateRange = ranges[i];
// add the span of time before the event (if there is any)
if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)
invertedRanges.push({ start: start, end: dateRange.start });
}
if (dateRange.end > start) {
start = dateRange.end;
}
}
// add the span of time after the last event (if there is any)
if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)
invertedRanges.push({ start: start, end: constraintRange.end });
}
return invertedRanges;
}
function compareRanges(range0, range1) {
return range0.start.valueOf() - range1.start.valueOf(); // earlier ranges go first
}
function intersectRanges(range0, range1) {
var start = range0.start, end = range0.end;
var newRange = null;
if (range1.start !== null) {
if (start === null) {
start = range1.start;
}
else {
start = new Date(Math.max(start.valueOf(), range1.start.valueOf()));
}
}
if (range1.end != null) {
if (end === null) {
end = range1.end;
}
else {
end = new Date(Math.min(end.valueOf(), range1.end.valueOf()));
}
}
if (start === null || end === null || start < end) {
newRange = { start: start, end: end };
}
return newRange;
}
function rangesEqual(range0, range1) {
return (range0.start === null ? null : range0.start.valueOf()) === (range1.start === null ? null : range1.start.valueOf()) &&
(range0.end === null ? null : range0.end.valueOf()) === (range1.end === null ? null : range1.end.valueOf());
}
function rangesIntersect(range0, range1) {
return (range0.end === null || range1.start === null || range0.end > range1.start) &&
(range0.start === null || range1.end === null || range0.start < range1.end);
}
function rangeContainsRange(outerRange, innerRange) {
return (outerRange.start === null || (innerRange.start !== null && innerRange.start >= outerRange.start)) &&
(outerRange.end === null || (innerRange.end !== null && innerRange.end <= outerRange.end));
}
function rangeContainsMarker(range, date) {
return (range.start === null || date >= range.start) &&
(range.end === null || date < range.end);
}
// If the given date is not within the given range, move it inside.
// (If it's past the end, make it one millisecond before the end).
function constrainMarkerToRange(date, range) {
if (range.start != null && date < range.start) {
return range.start;
}
if (range.end != null && date >= range.end) {
return new Date(range.end.valueOf() - 1);
}
return date;
}
/*
Specifying nextDayThreshold signals that all-day ranges should be sliced.
*/
function sliceEventStore(eventStore, eventUiBases, framingRange, nextDayThreshold) {
var inverseBgByGroupId = {};
var inverseBgByDefId = {};
var defByGroupId = {};
var bgRanges = [];
var fgRanges = [];
var eventUis = compileEventUis(eventStore.defs, eventUiBases);
for (var defId in eventStore.defs) {
var def = eventStore.defs[defId];
var ui = eventUis[def.defId];
if (ui.display === 'inverse-background') {
if (def.groupId) {
inverseBgByGroupId[def.groupId] = [];
if (!defByGroupId[def.groupId]) {
defByGroupId[def.groupId] = def;
}
}
else {
inverseBgByDefId[defId] = [];
}
}
}
for (var instanceId in eventStore.instances) {
var instance = eventStore.instances[instanceId];
var def = eventStore.defs[instance.defId];
var ui = eventUis[def.defId];
var origRange = instance.range;
var normalRange = (!def.allDay && nextDayThreshold) ?
computeVisibleDayRange(origRange, nextDayThreshold) :
origRange;
var slicedRange = intersectRanges(normalRange, framingRange);
if (slicedRange) {
if (ui.display === 'inverse-background') {
if (def.groupId) {
inverseBgByGroupId[def.groupId].push(slicedRange);
}
else {
inverseBgByDefId[instance.defId].push(slicedRange);
}
}
else if (ui.display !== 'none') {
(ui.display === 'background' ? bgRanges : fgRanges).push({
def: def,
ui: ui,
instance: instance,
range: slicedRange,
isStart: normalRange.start && normalRange.start.valueOf() === slicedRange.start.valueOf(),
isEnd: normalRange.end && normalRange.end.valueOf() === slicedRange.end.valueOf(),
});
}
}
}
for (var groupId in inverseBgByGroupId) { // BY GROUP
var ranges = inverseBgByGroupId[groupId];
var invertedRanges = invertRanges(ranges, framingRange);
for (var _i = 0, invertedRanges_1 = invertedRanges; _i < invertedRanges_1.length; _i++) {
var invertedRange = invertedRanges_1[_i];
var def = defByGroupId[groupId];
var ui = eventUis[def.defId];
bgRanges.push({
def: def,
ui: ui,
instance: null,
range: invertedRange,
isStart: false,
isEnd: false,
});
}
}
for (var defId in inverseBgByDefId) {
var ranges = inverseBgByDefId[defId];
var invertedRanges = invertRanges(ranges, framingRange);
for (var _a = 0, invertedRanges_2 = invertedRanges; _a < invertedRanges_2.length; _a++) {
var invertedRange = invertedRanges_2[_a];
bgRanges.push({
def: eventStore.defs[defId],
ui: eventUis[defId],
instance: null,
range: invertedRange,
isStart: false,
isEnd: false,
});
}
}
return { bg: bgRanges, fg: fgRanges };
}
function hasBgRendering(def) {
return def.ui.display === 'background' || def.ui.display === 'inverse-background';
}
function setElSeg(el, seg) {
el.fcSeg = seg;
}
function getElSeg(el) {
return el.fcSeg ||
el.parentNode.fcSeg || // for the harness
null;
}
// event ui computation
function compileEventUis(eventDefs, eventUiBases) {
return mapHash(eventDefs, function (eventDef) { return compileEventUi(eventDef, eventUiBases); });
}
function compileEventUi(eventDef, eventUiBases) {
var uis = [];
if (eventUiBases['']) {
uis.push(eventUiBases['']);
}
if (eventUiBases[eventDef.defId]) {
uis.push(eventUiBases[eventDef.defId]);
}
uis.push(eventDef.ui);
return combineEventUis(uis);
}
function sortEventSegs(segs, eventOrderSpecs) {
var objs = segs.map(buildSegCompareObj);
objs.sort(function (obj0, obj1) { return compareByFieldSpecs(obj0, obj1, eventOrderSpecs); });
return objs.map(function (c) { return c._seg; });
}
// returns a object with all primitive props that can be compared
function buildSegCompareObj(seg) {
var eventRange = seg.eventRange;
var eventDef = eventRange.def;
var range = eventRange.instance ? eventRange.instance.range : eventRange.range;
var start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events
var end = range.end ? range.end.valueOf() : 0; // "
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start: start,
end: end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg });
}
function computeSegDraggable(seg, context) {
var pluginHooks = context.pluginHooks;
var transformers = pluginHooks.isDraggableTransformers;
var _a = seg.eventRange, def = _a.def, ui = _a.ui;
var val = ui.startEditable;
for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {
var transformer = transformers_1[_i];
val = transformer(val, def, ui, context);
}
return val;
}
function computeSegStartResizable(seg, context) {
return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart;
}
function computeSegEndResizable(seg, context) {
return seg.isEnd && seg.eventRange.ui.durationEditable;
}
function buildSegTimeText(seg, timeFormat, context, defaultDisplayEventTime, // defaults to true
defaultDisplayEventEnd, // defaults to true
startOverride, endOverride) {
var dateEnv = context.dateEnv, options = context.options;
var displayEventTime = options.displayEventTime, displayEventEnd = options.displayEventEnd;
var eventDef = seg.eventRange.def;
var eventInstance = seg.eventRange.instance;
if (displayEventTime == null) {
displayEventTime = defaultDisplayEventTime !== false;
}
if (displayEventEnd == null) {
displayEventEnd = defaultDisplayEventEnd !== false;
}
var wholeEventStart = eventInstance.range.start;
var wholeEventEnd = eventInstance.range.end;
var segStart = startOverride || seg.start || seg.eventRange.range.start;
var segEnd = endOverride || seg.end || seg.eventRange.range.end;
var isStartDay = startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf();
var isEndDay = startOfDay(addMs(wholeEventEnd, -1)).valueOf() === startOfDay(addMs(segEnd, -1)).valueOf();
if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) {
segStart = isStartDay ? wholeEventStart : segStart;
segEnd = isEndDay ? wholeEventEnd : segEnd;
if (displayEventEnd && eventDef.hasEnd) {
return dateEnv.formatRange(segStart, segEnd, timeFormat, {
forcedStartTzo: startOverride ? null : eventInstance.forcedStartTzo,
forcedEndTzo: endOverride ? null : eventInstance.forcedEndTzo,
});
}
return dateEnv.format(segStart, timeFormat, {
forcedTzo: startOverride ? null : eventInstance.forcedStartTzo, // nooooo, same
});
}
return '';
}
function getSegMeta(seg, todayRange, nowDate) {
var segRange = seg.eventRange.range;
return {
isPast: segRange.end < (nowDate || todayRange.start),
isFuture: segRange.start >= (nowDate || todayRange.end),
isToday: todayRange && rangeContainsMarker(todayRange, segRange.start),
};
}
function getEventClassNames(props) {
var classNames = ['fc-event'];
if (props.isMirror) {
classNames.push('fc-event-mirror');
}
if (props.isDraggable) {
classNames.push('fc-event-draggable');
}
if (props.isStartResizable || props.isEndResizable) {
classNames.push('fc-event-resizable');
}
if (props.isDragging) {
classNames.push('fc-event-dragging');
}
if (props.isResizing) {
classNames.push('fc-event-resizing');
}
if (props.isSelected) {
classNames.push('fc-event-selected');
}
if (props.isStart) {
classNames.push('fc-event-start');
}
if (props.isEnd) {
classNames.push('fc-event-end');
}
if (props.isPast) {
classNames.push('fc-event-past');
}
if (props.isToday) {
classNames.push('fc-event-today');
}
if (props.isFuture) {
classNames.push('fc-event-future');
}
return classNames;
}
function buildEventRangeKey(eventRange) {
return eventRange.instance
? eventRange.instance.instanceId
: eventRange.def.defId + ":" + eventRange.range.start.toISOString();
// inverse-background events don't have specific instances. TODO: better solution
}
function getSegAnchorAttrs(seg, context) {
var _a = seg.eventRange, def = _a.def, instance = _a.instance;
var url = def.url;
if (url) {
return { href: url };
}
var emitter = context.emitter, options = context.options;
var eventInteractive = options.eventInteractive;
if (eventInteractive == null) {
eventInteractive = def.interactive;
if (eventInteractive == null) {
eventInteractive = Boolean(emitter.hasHandlers('eventClick'));
}
}
// mock what happens in EventClicking
if (eventInteractive) {
// only attach keyboard-related handlers because click handler is already done in EventClicking
return createAriaKeyboardAttrs(function (ev) {
emitter.trigger('eventClick', {
el: ev.target,
event: new EventApi(context, def, instance),
jsEvent: ev,
view: context.viewApi,
});
});
}
return {};
}
var STANDARD_PROPS = {
start: identity,
end: identity,
allDay: Boolean,
};
function parseDateSpan(raw, dateEnv, defaultDuration) {
var span = parseOpenDateSpan(raw, dateEnv);
var range = span.range;
if (!range.start) {
return null;
}
if (!range.end) {
if (defaultDuration == null) {
return null;
}
range.end = dateEnv.add(range.start, defaultDuration);
}
return span;
}
/*
TODO: somehow combine with parseRange?
Will return null if the start/end props were present but parsed invalidly.
*/
function parseOpenDateSpan(raw, dateEnv) {
var _a = refineProps(raw, STANDARD_PROPS), standardProps = _a.refined, extra = _a.extra;
var startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null;
var endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null;
var allDay = standardProps.allDay;
if (allDay == null) {
allDay = (startMeta && startMeta.isTimeUnspecified) &&
(!endMeta || endMeta.isTimeUnspecified);
}
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ range: {
start: startMeta ? startMeta.marker : null,
end: endMeta ? endMeta.marker : null,
}, allDay: allDay }, extra);
}
function isDateSpansEqual(span0, span1) {
return rangesEqual(span0.range, span1.range) &&
span0.allDay === span1.allDay &&
isSpanPropsEqual(span0, span1);
}
// the NON-DATE-RELATED props
function isSpanPropsEqual(span0, span1) {
for (var propName in span1) {
if (propName !== 'range' && propName !== 'allDay') {
if (span0[propName] !== span1[propName]) {
return false;
}
}
}
// are there any props that span0 has that span1 DOESN'T have?
// both have range/allDay, so no need to special-case.
for (var propName in span0) {
if (!(propName in span1)) {
return false;
}
}
return true;
}
function buildDateSpanApi(span, dateEnv) {
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, buildRangeApi(span.range, dateEnv, span.allDay)), { allDay: span.allDay });
}
function buildRangeApiWithTimeZone(range, dateEnv, omitTime) {
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, buildRangeApi(range, dateEnv, omitTime)), { timeZone: dateEnv.timeZone });
}
function buildRangeApi(range, dateEnv, omitTime) {
return {
start: dateEnv.toDate(range.start),
end: dateEnv.toDate(range.end),
startStr: dateEnv.formatIso(range.start, { omitTime: omitTime }),
endStr: dateEnv.formatIso(range.end, { omitTime: omitTime }),
};
}
function fabricateEventRange(dateSpan, eventUiBases, context) {
var res = refineEventDef({ editable: false }, context);
var def = parseEventDef(res.refined, res.extra, '', // sourceId
dateSpan.allDay, true, // hasEnd
context);
return {
def: def,
ui: compileEventUi(def, eventUiBases),
instance: createEventInstance(def.defId, dateSpan.range),
range: dateSpan.range,
isStart: true,
isEnd: true,
};
}
function triggerDateSelect(selection, pev, context) {
context.emitter.trigger('select', (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, buildDateSpanApiWithContext(selection, context)), { jsEvent: pev ? pev.origEvent : null, view: context.viewApi || context.calendarApi.view }));
}
function triggerDateUnselect(pev, context) {
context.emitter.trigger('unselect', {
jsEvent: pev ? pev.origEvent : null,
view: context.viewApi || context.calendarApi.view,
});
}
function buildDateSpanApiWithContext(dateSpan, context) {
var props = {};
for (var _i = 0, _a = context.pluginHooks.dateSpanTransforms; _i < _a.length; _i++) {
var transform = _a[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(props, transform(dateSpan, context));
}
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(props, buildDateSpanApi(dateSpan, context.dateEnv));
return props;
}
// Given an event's allDay status and start date, return what its fallback end date should be.
// TODO: rename to computeDefaultEventEnd
function getDefaultEventEnd(allDay, marker, context) {
var dateEnv = context.dateEnv, options = context.options;
var end = marker;
if (allDay) {
end = startOfDay(end);
end = dateEnv.add(end, options.defaultAllDayEventDuration);
}
else {
end = dateEnv.add(end, options.defaultTimedEventDuration);
}
return end;
}
// applies the mutation to ALL defs/instances within the event store
function applyMutationToEventStore(eventStore, eventConfigBase, mutation, context) {
var eventConfigs = compileEventUis(eventStore.defs, eventConfigBase);
var dest = createEmptyEventStore();
for (var defId in eventStore.defs) {
var def = eventStore.defs[defId];
dest.defs[defId] = applyMutationToEventDef(def, eventConfigs[defId], mutation, context);
}
for (var instanceId in eventStore.instances) {
var instance = eventStore.instances[instanceId];
var def = dest.defs[instance.defId]; // important to grab the newly modified def
dest.instances[instanceId] = applyMutationToEventInstance(instance, def, eventConfigs[instance.defId], mutation, context);
}
return dest;
}
function applyMutationToEventDef(eventDef, eventConfig, mutation, context) {
var standardProps = mutation.standardProps || {};
// if hasEnd has not been specified, guess a good value based on deltas.
// if duration will change, there's no way the default duration will persist,
// and thus, we need to mark the event as having a real end
if (standardProps.hasEnd == null &&
eventConfig.durationEditable &&
(mutation.startDelta || mutation.endDelta)) {
standardProps.hasEnd = true; // TODO: is this mutation okay?
}
var copy = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventDef), standardProps), { ui: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventDef.ui), standardProps.ui) });
if (mutation.extendedProps) {
copy.extendedProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, copy.extendedProps), mutation.extendedProps);
}
for (var _i = 0, _a = context.pluginHooks.eventDefMutationAppliers; _i < _a.length; _i++) {
var applier = _a[_i];
applier(copy, mutation, context);
}
if (!copy.hasEnd && context.options.forceEventDuration) {
copy.hasEnd = true;
}
return copy;
}
function applyMutationToEventInstance(eventInstance, eventDef, // must first be modified by applyMutationToEventDef
eventConfig, mutation, context) {
var dateEnv = context.dateEnv;
var forceAllDay = mutation.standardProps && mutation.standardProps.allDay === true;
var clearEnd = mutation.standardProps && mutation.standardProps.hasEnd === false;
var copy = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventInstance);
if (forceAllDay) {
copy.range = computeAlignedDayRange(copy.range);
}
if (mutation.datesDelta && eventConfig.startEditable) {
copy.range = {
start: dateEnv.add(copy.range.start, mutation.datesDelta),
end: dateEnv.add(copy.range.end, mutation.datesDelta),
};
}
if (mutation.startDelta && eventConfig.durationEditable) {
copy.range = {
start: dateEnv.add(copy.range.start, mutation.startDelta),
end: copy.range.end,
};
}
if (mutation.endDelta && eventConfig.durationEditable) {
copy.range = {
start: copy.range.start,
end: dateEnv.add(copy.range.end, mutation.endDelta),
};
}
if (clearEnd) {
copy.range = {
start: copy.range.start,
end: getDefaultEventEnd(eventDef.allDay, copy.range.start, context),
};
}
// in case event was all-day but the supplied deltas were not
// better util for this?
if (eventDef.allDay) {
copy.range = {
start: startOfDay(copy.range.start),
end: startOfDay(copy.range.end),
};
}
// handle invalid durations
if (copy.range.end < copy.range.start) {
copy.range.end = getDefaultEventEnd(eventDef.allDay, copy.range.start, context);
}
return copy;
}
// no public types yet. when there are, export from:
// import {} from './api-type-deps'
var ViewApi = /** @class */ (function () {
function ViewApi(type, getCurrentData, dateEnv) {
this.type = type;
this.getCurrentData = getCurrentData;
this.dateEnv = dateEnv;
}
Object.defineProperty(ViewApi.prototype, "calendar", {
get: function () {
return this.getCurrentData().calendarApi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ViewApi.prototype, "title", {
get: function () {
return this.getCurrentData().viewTitle;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ViewApi.prototype, "activeStart", {
get: function () {
return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start);
},
enumerable: false,
configurable: true
});
Object.defineProperty(ViewApi.prototype, "activeEnd", {
get: function () {
return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end);
},
enumerable: false,
configurable: true
});
Object.defineProperty(ViewApi.prototype, "currentStart", {
get: function () {
return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start);
},
enumerable: false,
configurable: true
});
Object.defineProperty(ViewApi.prototype, "currentEnd", {
get: function () {
return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end);
},
enumerable: false,
configurable: true
});
ViewApi.prototype.getOption = function (name) {
return this.getCurrentData().options[name]; // are the view-specific options
};
return ViewApi;
}());
var EVENT_SOURCE_REFINERS = {
id: String,
defaultAllDay: Boolean,
url: String,
format: String,
events: identity,
eventDataTransform: identity,
// for any network-related sources
success: identity,
failure: identity,
};
function parseEventSource(raw, context, refiners) {
if (refiners === void 0) { refiners = buildEventSourceRefiners(context); }
var rawObj;
if (typeof raw === 'string') {
rawObj = { url: raw };
}
else if (typeof raw === 'function' || Array.isArray(raw)) {
rawObj = { events: raw };
}
else if (typeof raw === 'object' && raw) { // not null
rawObj = raw;
}
if (rawObj) {
var _a = refineProps(rawObj, refiners), refined = _a.refined, extra = _a.extra;
var metaRes = buildEventSourceMeta(refined, context);
if (metaRes) {
return {
_raw: raw,
isFetching: false,
latestFetchId: '',
fetchRange: null,
defaultAllDay: refined.defaultAllDay,
eventDataTransform: refined.eventDataTransform,
success: refined.success,
failure: refined.failure,
publicId: refined.id || '',
sourceId: guid(),
sourceDefId: metaRes.sourceDefId,
meta: metaRes.meta,
ui: createEventUi(refined, context),
extendedProps: extra,
};
}
}
return null;
}
function buildEventSourceRefiners(context) {
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, EVENT_UI_REFINERS), EVENT_SOURCE_REFINERS), context.pluginHooks.eventSourceRefiners);
}
function buildEventSourceMeta(raw, context) {
var defs = context.pluginHooks.eventSourceDefs;
for (var i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence
var def = defs[i];
var meta = def.parseMeta(raw);
if (meta) {
return { sourceDefId: i, meta: meta };
}
}
return null;
}
function reduceCurrentDate(currentDate, action) {
switch (action.type) {
case 'CHANGE_DATE':
return action.dateMarker;
default:
return currentDate;
}
}
function getInitialDate(options, dateEnv) {
var initialDateInput = options.initialDate;
// compute the initial ambig-timezone date
if (initialDateInput != null) {
return dateEnv.createMarker(initialDateInput);
}
return getNow(options.now, dateEnv); // getNow already returns unzoned
}
function getNow(nowInput, dateEnv) {
if (typeof nowInput === 'function') {
nowInput = nowInput();
}
if (nowInput == null) {
return dateEnv.createNowMarker();
}
return dateEnv.createMarker(nowInput);
}
var CalendarApi = /** @class */ (function () {
function CalendarApi() {
}
CalendarApi.prototype.getCurrentData = function () {
return this.currentDataManager.getCurrentData();
};
CalendarApi.prototype.dispatch = function (action) {
return this.currentDataManager.dispatch(action);
};
Object.defineProperty(CalendarApi.prototype, "view", {
get: function () { return this.getCurrentData().viewApi; } // for public API
,
enumerable: false,
configurable: true
});
CalendarApi.prototype.batchRendering = function (callback) {
callback();
};
CalendarApi.prototype.updateSize = function () {
this.trigger('_resize', true);
};
// Options
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.setOption = function (name, val) {
this.dispatch({
type: 'SET_OPTION',
optionName: name,
rawOptionValue: val,
});
};
CalendarApi.prototype.getOption = function (name) {
return this.currentDataManager.currentCalendarOptionsInput[name];
};
CalendarApi.prototype.getAvailableLocaleCodes = function () {
return Object.keys(this.getCurrentData().availableRawLocales);
};
// Trigger
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.on = function (handlerName, handler) {
var currentDataManager = this.currentDataManager;
if (currentDataManager.currentCalendarOptionsRefiners[handlerName]) {
currentDataManager.emitter.on(handlerName, handler);
}
else {
console.warn("Unknown listener name '" + handlerName + "'");
}
};
CalendarApi.prototype.off = function (handlerName, handler) {
this.currentDataManager.emitter.off(handlerName, handler);
};
// not meant for public use
CalendarApi.prototype.trigger = function (handlerName) {
var _a;
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
(_a = this.currentDataManager.emitter).trigger.apply(_a, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([handlerName], args));
};
// View
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.changeView = function (viewType, dateOrRange) {
var _this = this;
this.batchRendering(function () {
_this.unselect();
if (dateOrRange) {
if (dateOrRange.start && dateOrRange.end) { // a range
_this.dispatch({
type: 'CHANGE_VIEW_TYPE',
viewType: viewType,
});
_this.dispatch({
type: 'SET_OPTION',
optionName: 'visibleRange',
rawOptionValue: dateOrRange,
});
}
else {
var dateEnv = _this.getCurrentData().dateEnv;
_this.dispatch({
type: 'CHANGE_VIEW_TYPE',
viewType: viewType,
dateMarker: dateEnv.createMarker(dateOrRange),
});
}
}
else {
_this.dispatch({
type: 'CHANGE_VIEW_TYPE',
viewType: viewType,
});
}
});
};
// Forces navigation to a view for the given date.
// `viewType` can be a specific view name or a generic one like "week" or "day".
// needs to change
CalendarApi.prototype.zoomTo = function (dateMarker, viewType) {
var state = this.getCurrentData();
var spec;
viewType = viewType || 'day'; // day is default zoom
spec = state.viewSpecs[viewType] || this.getUnitViewSpec(viewType);
this.unselect();
if (spec) {
this.dispatch({
type: 'CHANGE_VIEW_TYPE',
viewType: spec.type,
dateMarker: dateMarker,
});
}
else {
this.dispatch({
type: 'CHANGE_DATE',
dateMarker: dateMarker,
});
}
};
// Given a duration singular unit, like "week" or "day", finds a matching view spec.
// Preference is given to views that have corresponding buttons.
CalendarApi.prototype.getUnitViewSpec = function (unit) {
var _a = this.getCurrentData(), viewSpecs = _a.viewSpecs, toolbarConfig = _a.toolbarConfig;
var viewTypes = [].concat(toolbarConfig.header ? toolbarConfig.header.viewsWithButtons : [], toolbarConfig.footer ? toolbarConfig.footer.viewsWithButtons : []);
var i;
var spec;
for (var viewType in viewSpecs) {
viewTypes.push(viewType);
}
for (i = 0; i < viewTypes.length; i += 1) {
spec = viewSpecs[viewTypes[i]];
if (spec) {
if (spec.singleUnit === unit) {
return spec;
}
}
}
return null;
};
// Current Date
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.prev = function () {
this.unselect();
this.dispatch({ type: 'PREV' });
};
CalendarApi.prototype.next = function () {
this.unselect();
this.dispatch({ type: 'NEXT' });
};
CalendarApi.prototype.prevYear = function () {
var state = this.getCurrentData();
this.unselect();
this.dispatch({
type: 'CHANGE_DATE',
dateMarker: state.dateEnv.addYears(state.currentDate, -1),
});
};
CalendarApi.prototype.nextYear = function () {
var state = this.getCurrentData();
this.unselect();
this.dispatch({
type: 'CHANGE_DATE',
dateMarker: state.dateEnv.addYears(state.currentDate, 1),
});
};
CalendarApi.prototype.today = function () {
var state = this.getCurrentData();
this.unselect();
this.dispatch({
type: 'CHANGE_DATE',
dateMarker: getNow(state.calendarOptions.now, state.dateEnv),
});
};
CalendarApi.prototype.gotoDate = function (zonedDateInput) {
var state = this.getCurrentData();
this.unselect();
this.dispatch({
type: 'CHANGE_DATE',
dateMarker: state.dateEnv.createMarker(zonedDateInput),
});
};
CalendarApi.prototype.incrementDate = function (deltaInput) {
var state = this.getCurrentData();
var delta = createDuration(deltaInput);
if (delta) { // else, warn about invalid input?
this.unselect();
this.dispatch({
type: 'CHANGE_DATE',
dateMarker: state.dateEnv.add(state.currentDate, delta),
});
}
};
// for external API
CalendarApi.prototype.getDate = function () {
var state = this.getCurrentData();
return state.dateEnv.toDate(state.currentDate);
};
// Date Formatting Utils
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.formatDate = function (d, formatter) {
var dateEnv = this.getCurrentData().dateEnv;
return dateEnv.format(dateEnv.createMarker(d), createFormatter(formatter));
};
// `settings` is for formatter AND isEndExclusive
CalendarApi.prototype.formatRange = function (d0, d1, settings) {
var dateEnv = this.getCurrentData().dateEnv;
return dateEnv.formatRange(dateEnv.createMarker(d0), dateEnv.createMarker(d1), createFormatter(settings), settings);
};
CalendarApi.prototype.formatIso = function (d, omitTime) {
var dateEnv = this.getCurrentData().dateEnv;
return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime: omitTime });
};
// Date Selection / Event Selection / DayClick
// -----------------------------------------------------------------------------------------------------------------
// this public method receives start/end dates in any format, with any timezone
// NOTE: args were changed from v3
CalendarApi.prototype.select = function (dateOrObj, endDate) {
var selectionInput;
if (endDate == null) {
if (dateOrObj.start != null) {
selectionInput = dateOrObj;
}
else {
selectionInput = {
start: dateOrObj,
end: null,
};
}
}
else {
selectionInput = {
start: dateOrObj,
end: endDate,
};
}
var state = this.getCurrentData();
var selection = parseDateSpan(selectionInput, state.dateEnv, createDuration({ days: 1 }));
if (selection) { // throw parse error otherwise?
this.dispatch({ type: 'SELECT_DATES', selection: selection });
triggerDateSelect(selection, null, state);
}
};
// public method
CalendarApi.prototype.unselect = function (pev) {
var state = this.getCurrentData();
if (state.dateSelection) {
this.dispatch({ type: 'UNSELECT_DATES' });
triggerDateUnselect(pev, state);
}
};
// Public Events API
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.addEvent = function (eventInput, sourceInput) {
if (eventInput instanceof EventApi) {
var def = eventInput._def;
var instance = eventInput._instance;
var currentData = this.getCurrentData();
// not already present? don't want to add an old snapshot
if (!currentData.eventStore.defs[def.defId]) {
this.dispatch({
type: 'ADD_EVENTS',
eventStore: eventTupleToStore({ def: def, instance: instance }), // TODO: better util for two args?
});
this.triggerEventAdd(eventInput);
}
return eventInput;
}
var state = this.getCurrentData();
var eventSource;
if (sourceInput instanceof EventSourceApi) {
eventSource = sourceInput.internalEventSource;
}
else if (typeof sourceInput === 'boolean') {
if (sourceInput) { // true. part of the first event source
eventSource = hashValuesToArray(state.eventSources)[0];
}
}
else if (sourceInput != null) { // an ID. accepts a number too
var sourceApi = this.getEventSourceById(sourceInput); // TODO: use an internal function
if (!sourceApi) {
console.warn("Could not find an event source with ID \"" + sourceInput + "\""); // TODO: test
return null;
}
eventSource = sourceApi.internalEventSource;
}
var tuple = parseEvent(eventInput, eventSource, state, false);
if (tuple) {
var newEventApi = new EventApi(state, tuple.def, tuple.def.recurringDef ? null : tuple.instance);
this.dispatch({
type: 'ADD_EVENTS',
eventStore: eventTupleToStore(tuple),
});
this.triggerEventAdd(newEventApi);
return newEventApi;
}
return null;
};
CalendarApi.prototype.triggerEventAdd = function (eventApi) {
var _this = this;
var emitter = this.getCurrentData().emitter;
emitter.trigger('eventAdd', {
event: eventApi,
relatedEvents: [],
revert: function () {
_this.dispatch({
type: 'REMOVE_EVENTS',
eventStore: eventApiToStore(eventApi),
});
},
});
};
// TODO: optimize
CalendarApi.prototype.getEventById = function (id) {
var state = this.getCurrentData();
var _a = state.eventStore, defs = _a.defs, instances = _a.instances;
id = String(id);
for (var defId in defs) {
var def = defs[defId];
if (def.publicId === id) {
if (def.recurringDef) {
return new EventApi(state, def, null);
}
for (var instanceId in instances) {
var instance = instances[instanceId];
if (instance.defId === def.defId) {
return new EventApi(state, def, instance);
}
}
}
}
return null;
};
CalendarApi.prototype.getEvents = function () {
var currentData = this.getCurrentData();
return buildEventApis(currentData.eventStore, currentData);
};
CalendarApi.prototype.removeAllEvents = function () {
this.dispatch({ type: 'REMOVE_ALL_EVENTS' });
};
// Public Event Sources API
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.getEventSources = function () {
var state = this.getCurrentData();
var sourceHash = state.eventSources;
var sourceApis = [];
for (var internalId in sourceHash) {
sourceApis.push(new EventSourceApi(state, sourceHash[internalId]));
}
return sourceApis;
};
CalendarApi.prototype.getEventSourceById = function (id) {
var state = this.getCurrentData();
var sourceHash = state.eventSources;
id = String(id);
for (var sourceId in sourceHash) {
if (sourceHash[sourceId].publicId === id) {
return new EventSourceApi(state, sourceHash[sourceId]);
}
}
return null;
};
CalendarApi.prototype.addEventSource = function (sourceInput) {
var state = this.getCurrentData();
if (sourceInput instanceof EventSourceApi) {
// not already present? don't want to add an old snapshot
if (!state.eventSources[sourceInput.internalEventSource.sourceId]) {
this.dispatch({
type: 'ADD_EVENT_SOURCES',
sources: [sourceInput.internalEventSource],
});
}
return sourceInput;
}
var eventSource = parseEventSource(sourceInput, state);
if (eventSource) { // TODO: error otherwise?
this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: [eventSource] });
return new EventSourceApi(state, eventSource);
}
return null;
};
CalendarApi.prototype.removeAllEventSources = function () {
this.dispatch({ type: 'REMOVE_ALL_EVENT_SOURCES' });
};
CalendarApi.prototype.refetchEvents = function () {
this.dispatch({ type: 'FETCH_EVENT_SOURCES', isRefetch: true });
};
// Scroll
// -----------------------------------------------------------------------------------------------------------------
CalendarApi.prototype.scrollToTime = function (timeInput) {
var time = createDuration(timeInput);
if (time) {
this.trigger('_scrollRequest', { time: time });
}
};
return CalendarApi;
}());
var EventApi = /** @class */ (function () {
// instance will be null if expressing a recurring event that has no current instances,
// OR if trying to validate an incoming external event that has no dates assigned
function EventApi(context, def, instance) {
this._context = context;
this._def = def;
this._instance = instance || null;
}
/*
TODO: make event struct more responsible for this
*/
EventApi.prototype.setProp = function (name, val) {
var _a, _b;
if (name in EVENT_DATE_REFINERS) {
console.warn('Could not set date-related prop \'name\'. Use one of the date-related methods instead.');
// TODO: make proper aliasing system?
}
else if (name === 'id') {
val = EVENT_NON_DATE_REFINERS[name](val);
this.mutate({
standardProps: { publicId: val }, // hardcoded internal name
});
}
else if (name in EVENT_NON_DATE_REFINERS) {
val = EVENT_NON_DATE_REFINERS[name](val);
this.mutate({
standardProps: (_a = {}, _a[name] = val, _a),
});
}
else if (name in EVENT_UI_REFINERS) {
var ui = EVENT_UI_REFINERS[name](val);
if (name === 'color') {
ui = { backgroundColor: val, borderColor: val };
}
else if (name === 'editable') {
ui = { startEditable: val, durationEditable: val };
}
else {
ui = (_b = {}, _b[name] = val, _b);
}
this.mutate({
standardProps: { ui: ui },
});
}
else {
console.warn("Could not set prop '" + name + "'. Use setExtendedProp instead.");
}
};
EventApi.prototype.setExtendedProp = function (name, val) {
var _a;
this.mutate({
extendedProps: (_a = {}, _a[name] = val, _a),
});
};
EventApi.prototype.setStart = function (startInput, options) {
if (options === void 0) { options = {}; }
var dateEnv = this._context.dateEnv;
var start = dateEnv.createMarker(startInput);
if (start && this._instance) { // TODO: warning if parsed bad
var instanceRange = this._instance.range;
var startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity); // what if parsed bad!?
if (options.maintainDuration) {
this.mutate({ datesDelta: startDelta });
}
else {
this.mutate({ startDelta: startDelta });
}
}
};
EventApi.prototype.setEnd = function (endInput, options) {
if (options === void 0) { options = {}; }
var dateEnv = this._context.dateEnv;
var end;
if (endInput != null) {
end = dateEnv.createMarker(endInput);
if (!end) {
return; // TODO: warning if parsed bad
}
}
if (this._instance) {
if (end) {
var endDelta = diffDates(this._instance.range.end, end, dateEnv, options.granularity);
this.mutate({ endDelta: endDelta });
}
else {
this.mutate({ standardProps: { hasEnd: false } });
}
}
};
EventApi.prototype.setDates = function (startInput, endInput, options) {
if (options === void 0) { options = {}; }
var dateEnv = this._context.dateEnv;
var standardProps = { allDay: options.allDay };
var start = dateEnv.createMarker(startInput);
var end;
if (!start) {
return; // TODO: warning if parsed bad
}
if (endInput != null) {
end = dateEnv.createMarker(endInput);
if (!end) { // TODO: warning if parsed bad
return;
}
}
if (this._instance) {
var instanceRange = this._instance.range;
// when computing the diff for an event being converted to all-day,
// compute diff off of the all-day values the way event-mutation does.
if (options.allDay === true) {
instanceRange = computeAlignedDayRange(instanceRange);
}
var startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity);
if (end) {
var endDelta = diffDates(instanceRange.end, end, dateEnv, options.granularity);
if (durationsEqual(startDelta, endDelta)) {
this.mutate({ datesDelta: startDelta, standardProps: standardProps });
}
else {
this.mutate({ startDelta: startDelta, endDelta: endDelta, standardProps: standardProps });
}
}
else { // means "clear the end"
standardProps.hasEnd = false;
this.mutate({ datesDelta: startDelta, standardProps: standardProps });
}
}
};
EventApi.prototype.moveStart = function (deltaInput) {
var delta = createDuration(deltaInput);
if (delta) { // TODO: warning if parsed bad
this.mutate({ startDelta: delta });
}
};
EventApi.prototype.moveEnd = function (deltaInput) {
var delta = createDuration(deltaInput);
if (delta) { // TODO: warning if parsed bad
this.mutate({ endDelta: delta });
}
};
EventApi.prototype.moveDates = function (deltaInput) {
var delta = createDuration(deltaInput);
if (delta) { // TODO: warning if parsed bad
this.mutate({ datesDelta: delta });
}
};
EventApi.prototype.setAllDay = function (allDay, options) {
if (options === void 0) { options = {}; }
var standardProps = { allDay: allDay };
var maintainDuration = options.maintainDuration;
if (maintainDuration == null) {
maintainDuration = this._context.options.allDayMaintainDuration;
}
if (this._def.allDay !== allDay) {
standardProps.hasEnd = maintainDuration;
}
this.mutate({ standardProps: standardProps });
};
EventApi.prototype.formatRange = function (formatInput) {
var dateEnv = this._context.dateEnv;
var instance = this._instance;
var formatter = createFormatter(formatInput);
if (this._def.hasEnd) {
return dateEnv.formatRange(instance.range.start, instance.range.end, formatter, {
forcedStartTzo: instance.forcedStartTzo,
forcedEndTzo: instance.forcedEndTzo,
});
}
return dateEnv.format(instance.range.start, formatter, {
forcedTzo: instance.forcedStartTzo,
});
};
EventApi.prototype.mutate = function (mutation) {
var instance = this._instance;
if (instance) {
var def = this._def;
var context_1 = this._context;
var eventStore_1 = context_1.getCurrentData().eventStore;
var relevantEvents = getRelevantEvents(eventStore_1, instance.instanceId);
var eventConfigBase = {
'': {
display: '',
startEditable: true,
durationEditable: true,
constraints: [],
overlap: null,
allows: [],
backgroundColor: '',
borderColor: '',
textColor: '',
classNames: [],
},
};
relevantEvents = applyMutationToEventStore(relevantEvents, eventConfigBase, mutation, context_1);
var oldEvent = new EventApi(context_1, def, instance); // snapshot
this._def = relevantEvents.defs[def.defId];
this._instance = relevantEvents.instances[instance.instanceId];
context_1.dispatch({
type: 'MERGE_EVENTS',
eventStore: relevantEvents,
});
context_1.emitter.trigger('eventChange', {
oldEvent: oldEvent,
event: this,
relatedEvents: buildEventApis(relevantEvents, context_1, instance),
revert: function () {
context_1.dispatch({
type: 'RESET_EVENTS',
eventStore: eventStore_1,
});
},
});
}
};
EventApi.prototype.remove = function () {
var context = this._context;
var asStore = eventApiToStore(this);
context.dispatch({
type: 'REMOVE_EVENTS',
eventStore: asStore,
});
context.emitter.trigger('eventRemove', {
event: this,
relatedEvents: [],
revert: function () {
context.dispatch({
type: 'MERGE_EVENTS',
eventStore: asStore,
});
},
});
};
Object.defineProperty(EventApi.prototype, "source", {
get: function () {
var sourceId = this._def.sourceId;
if (sourceId) {
return new EventSourceApi(this._context, this._context.getCurrentData().eventSources[sourceId]);
}
return null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "start", {
get: function () {
return this._instance ?
this._context.dateEnv.toDate(this._instance.range.start) :
null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "end", {
get: function () {
return (this._instance && this._def.hasEnd) ?
this._context.dateEnv.toDate(this._instance.range.end) :
null;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "startStr", {
get: function () {
var instance = this._instance;
if (instance) {
return this._context.dateEnv.formatIso(instance.range.start, {
omitTime: this._def.allDay,
forcedTzo: instance.forcedStartTzo,
});
}
return '';
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "endStr", {
get: function () {
var instance = this._instance;
if (instance && this._def.hasEnd) {
return this._context.dateEnv.formatIso(instance.range.end, {
omitTime: this._def.allDay,
forcedTzo: instance.forcedEndTzo,
});
}
return '';
},
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "id", {
// computable props that all access the def
// TODO: find a TypeScript-compatible way to do this at scale
get: function () { return this._def.publicId; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "groupId", {
get: function () { return this._def.groupId; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "allDay", {
get: function () { return this._def.allDay; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "title", {
get: function () { return this._def.title; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "url", {
get: function () { return this._def.url; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "display", {
get: function () { return this._def.ui.display || 'auto'; } // bad. just normalize the type earlier
,
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "startEditable", {
get: function () { return this._def.ui.startEditable; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "durationEditable", {
get: function () { return this._def.ui.durationEditable; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "constraint", {
get: function () { return this._def.ui.constraints[0] || null; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "overlap", {
get: function () { return this._def.ui.overlap; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "allow", {
get: function () { return this._def.ui.allows[0] || null; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "backgroundColor", {
get: function () { return this._def.ui.backgroundColor; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "borderColor", {
get: function () { return this._def.ui.borderColor; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "textColor", {
get: function () { return this._def.ui.textColor; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "classNames", {
// NOTE: user can't modify these because Object.freeze was called in event-def parsing
get: function () { return this._def.ui.classNames; },
enumerable: false,
configurable: true
});
Object.defineProperty(EventApi.prototype, "extendedProps", {
get: function () { return this._def.extendedProps; },
enumerable: false,
configurable: true
});
EventApi.prototype.toPlainObject = function (settings) {
if (settings === void 0) { settings = {}; }
var def = this._def;
var ui = def.ui;
var _a = this, startStr = _a.startStr, endStr = _a.endStr;
var res = {};
if (def.title) {
res.title = def.title;
}
if (startStr) {
res.start = startStr;
}
if (endStr) {
res.end = endStr;
}
if (def.publicId) {
res.id = def.publicId;
}
if (def.groupId) {
res.groupId = def.groupId;
}
if (def.url) {
res.url = def.url;
}
if (ui.display && ui.display !== 'auto') {
res.display = ui.display;
}
// TODO: what about recurring-event properties???
// TODO: include startEditable/durationEditable/constraint/overlap/allow
if (settings.collapseColor && ui.backgroundColor && ui.backgroundColor === ui.borderColor) {
res.color = ui.backgroundColor;
}
else {
if (ui.backgroundColor) {
res.backgroundColor = ui.backgroundColor;
}
if (ui.borderColor) {
res.borderColor = ui.borderColor;
}
}
if (ui.textColor) {
res.textColor = ui.textColor;
}
if (ui.classNames.length) {
res.classNames = ui.classNames;
}
if (Object.keys(def.extendedProps).length) {
if (settings.collapseExtendedProps) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(res, def.extendedProps);
}
else {
res.extendedProps = def.extendedProps;
}
}
return res;
};
EventApi.prototype.toJSON = function () {
return this.toPlainObject();
};
return EventApi;
}());
function eventApiToStore(eventApi) {
var _a, _b;
var def = eventApi._def;
var instance = eventApi._instance;
return {
defs: (_a = {}, _a[def.defId] = def, _a),
instances: instance
? (_b = {}, _b[instance.instanceId] = instance, _b) : {},
};
}
function buildEventApis(eventStore, context, excludeInstance) {
var defs = eventStore.defs, instances = eventStore.instances;
var eventApis = [];
var excludeInstanceId = excludeInstance ? excludeInstance.instanceId : '';
for (var id in instances) {
var instance = instances[id];
var def = defs[instance.defId];
if (instance.instanceId !== excludeInstanceId) {
eventApis.push(new EventApi(context, def, instance));
}
}
return eventApis;
}
var calendarSystemClassMap = {};
function registerCalendarSystem(name, theClass) {
calendarSystemClassMap[name] = theClass;
}
function createCalendarSystem(name) {
return new calendarSystemClassMap[name]();
}
var GregorianCalendarSystem = /** @class */ (function () {
function GregorianCalendarSystem() {
}
GregorianCalendarSystem.prototype.getMarkerYear = function (d) {
return d.getUTCFullYear();
};
GregorianCalendarSystem.prototype.getMarkerMonth = function (d) {
return d.getUTCMonth();
};
GregorianCalendarSystem.prototype.getMarkerDay = function (d) {
return d.getUTCDate();
};
GregorianCalendarSystem.prototype.arrayToMarker = function (arr) {
return arrayToUtcDate(arr);
};
GregorianCalendarSystem.prototype.markerToArray = function (marker) {
return dateToUtcArray(marker);
};
return GregorianCalendarSystem;
}());
registerCalendarSystem('gregory', GregorianCalendarSystem);
var ISO_RE = /^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;
function parse(str) {
var m = ISO_RE.exec(str);
if (m) {
var marker = new Date(Date.UTC(Number(m[1]), m[3] ? Number(m[3]) - 1 : 0, Number(m[5] || 1), Number(m[7] || 0), Number(m[8] || 0), Number(m[10] || 0), m[12] ? Number("0." + m[12]) * 1000 : 0));
if (isValidDate(marker)) {
var timeZoneOffset = null;
if (m[13]) {
timeZoneOffset = (m[15] === '-' ? -1 : 1) * (Number(m[16] || 0) * 60 +
Number(m[18] || 0));
}
return {
marker: marker,
isTimeUnspecified: !m[6],
timeZoneOffset: timeZoneOffset,
};
}
}
return null;
}
var DateEnv = /** @class */ (function () {
function DateEnv(settings) {
var timeZone = this.timeZone = settings.timeZone;
var isNamedTimeZone = timeZone !== 'local' && timeZone !== 'UTC';
if (settings.namedTimeZoneImpl && isNamedTimeZone) {
this.namedTimeZoneImpl = new settings.namedTimeZoneImpl(timeZone);
}
this.canComputeOffset = Boolean(!isNamedTimeZone || this.namedTimeZoneImpl);
this.calendarSystem = createCalendarSystem(settings.calendarSystem);
this.locale = settings.locale;
this.weekDow = settings.locale.week.dow;
this.weekDoy = settings.locale.week.doy;
if (settings.weekNumberCalculation === 'ISO') {
this.weekDow = 1;
this.weekDoy = 4;
}
if (typeof settings.firstDay === 'number') {
this.weekDow = settings.firstDay;
}
if (typeof settings.weekNumberCalculation === 'function') {
this.weekNumberFunc = settings.weekNumberCalculation;
}
this.weekText = settings.weekText != null ? settings.weekText : settings.locale.options.weekText;
this.weekTextLong = (settings.weekTextLong != null ? settings.weekTextLong : settings.locale.options.weekTextLong) || this.weekText;
this.cmdFormatter = settings.cmdFormatter;
this.defaultSeparator = settings.defaultSeparator;
}
// Creating / Parsing
DateEnv.prototype.createMarker = function (input) {
var meta = this.createMarkerMeta(input);
if (meta === null) {
return null;
}
return meta.marker;
};
DateEnv.prototype.createNowMarker = function () {
if (this.canComputeOffset) {
return this.timestampToMarker(new Date().valueOf());
}
// if we can't compute the current date val for a timezone,
// better to give the current local date vals than UTC
return arrayToUtcDate(dateToLocalArray(new Date()));
};
DateEnv.prototype.createMarkerMeta = function (input) {
if (typeof input === 'string') {
return this.parse(input);
}
var marker = null;
if (typeof input === 'number') {
marker = this.timestampToMarker(input);
}
else if (input instanceof Date) {
input = input.valueOf();
if (!isNaN(input)) {
marker = this.timestampToMarker(input);
}
}
else if (Array.isArray(input)) {
marker = arrayToUtcDate(input);
}
if (marker === null || !isValidDate(marker)) {
return null;
}
return { marker: marker, isTimeUnspecified: false, forcedTzo: null };
};
DateEnv.prototype.parse = function (s) {
var parts = parse(s);
if (parts === null) {
return null;
}
var marker = parts.marker;
var forcedTzo = null;
if (parts.timeZoneOffset !== null) {
if (this.canComputeOffset) {
marker = this.timestampToMarker(marker.valueOf() - parts.timeZoneOffset * 60 * 1000);
}
else {
forcedTzo = parts.timeZoneOffset;
}
}
return { marker: marker, isTimeUnspecified: parts.isTimeUnspecified, forcedTzo: forcedTzo };
};
// Accessors
DateEnv.prototype.getYear = function (marker) {
return this.calendarSystem.getMarkerYear(marker);
};
DateEnv.prototype.getMonth = function (marker) {
return this.calendarSystem.getMarkerMonth(marker);
};
// Adding / Subtracting
DateEnv.prototype.add = function (marker, dur) {
var a = this.calendarSystem.markerToArray(marker);
a[0] += dur.years;
a[1] += dur.months;
a[2] += dur.days;
a[6] += dur.milliseconds;
return this.calendarSystem.arrayToMarker(a);
};
DateEnv.prototype.subtract = function (marker, dur) {
var a = this.calendarSystem.markerToArray(marker);
a[0] -= dur.years;
a[1] -= dur.months;
a[2] -= dur.days;
a[6] -= dur.milliseconds;
return this.calendarSystem.arrayToMarker(a);
};
DateEnv.prototype.addYears = function (marker, n) {
var a = this.calendarSystem.markerToArray(marker);
a[0] += n;
return this.calendarSystem.arrayToMarker(a);
};
DateEnv.prototype.addMonths = function (marker, n) {
var a = this.calendarSystem.markerToArray(marker);
a[1] += n;
return this.calendarSystem.arrayToMarker(a);
};
// Diffing Whole Units
DateEnv.prototype.diffWholeYears = function (m0, m1) {
var calendarSystem = this.calendarSystem;
if (timeAsMs(m0) === timeAsMs(m1) &&
calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) &&
calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1)) {
return calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0);
}
return null;
};
DateEnv.prototype.diffWholeMonths = function (m0, m1) {
var calendarSystem = this.calendarSystem;
if (timeAsMs(m0) === timeAsMs(m1) &&
calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1)) {
return (calendarSystem.getMarkerMonth(m1) - calendarSystem.getMarkerMonth(m0)) +
(calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)) * 12;
}
return null;
};
// Range / Duration
DateEnv.prototype.greatestWholeUnit = function (m0, m1) {
var n = this.diffWholeYears(m0, m1);
if (n !== null) {
return { unit: 'year', value: n };
}
n = this.diffWholeMonths(m0, m1);
if (n !== null) {
return { unit: 'month', value: n };
}
n = diffWholeWeeks(m0, m1);
if (n !== null) {
return { unit: 'week', value: n };
}
n = diffWholeDays(m0, m1);
if (n !== null) {
return { unit: 'day', value: n };
}
n = diffHours(m0, m1);
if (isInt(n)) {
return { unit: 'hour', value: n };
}
n = diffMinutes(m0, m1);
if (isInt(n)) {
return { unit: 'minute', value: n };
}
n = diffSeconds(m0, m1);
if (isInt(n)) {
return { unit: 'second', value: n };
}
return { unit: 'millisecond', value: m1.valueOf() - m0.valueOf() };
};
DateEnv.prototype.countDurationsBetween = function (m0, m1, d) {
// TODO: can use greatestWholeUnit
var diff;
if (d.years) {
diff = this.diffWholeYears(m0, m1);
if (diff !== null) {
return diff / asRoughYears(d);
}
}
if (d.months) {
diff = this.diffWholeMonths(m0, m1);
if (diff !== null) {
return diff / asRoughMonths(d);
}
}
if (d.days) {
diff = diffWholeDays(m0, m1);
if (diff !== null) {
return diff / asRoughDays(d);
}
}
return (m1.valueOf() - m0.valueOf()) / asRoughMs(d);
};
// Start-Of
// these DON'T return zoned-dates. only UTC start-of dates
DateEnv.prototype.startOf = function (m, unit) {
if (unit === 'year') {
return this.startOfYear(m);
}
if (unit === 'month') {
return this.startOfMonth(m);
}
if (unit === 'week') {
return this.startOfWeek(m);
}
if (unit === 'day') {
return startOfDay(m);
}
if (unit === 'hour') {
return startOfHour(m);
}
if (unit === 'minute') {
return startOfMinute(m);
}
if (unit === 'second') {
return startOfSecond(m);
}
return null;
};
DateEnv.prototype.startOfYear = function (m) {
return this.calendarSystem.arrayToMarker([
this.calendarSystem.getMarkerYear(m),
]);
};
DateEnv.prototype.startOfMonth = function (m) {
return this.calendarSystem.arrayToMarker([
this.calendarSystem.getMarkerYear(m),
this.calendarSystem.getMarkerMonth(m),
]);
};
DateEnv.prototype.startOfWeek = function (m) {
return this.calendarSystem.arrayToMarker([
this.calendarSystem.getMarkerYear(m),
this.calendarSystem.getMarkerMonth(m),
m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7),
]);
};
// Week Number
DateEnv.prototype.computeWeekNumber = function (marker) {
if (this.weekNumberFunc) {
return this.weekNumberFunc(this.toDate(marker));
}
return weekOfYear(marker, this.weekDow, this.weekDoy);
};
// TODO: choke on timeZoneName: long
DateEnv.prototype.format = function (marker, formatter, dateOptions) {
if (dateOptions === void 0) { dateOptions = {}; }
return formatter.format({
marker: marker,
timeZoneOffset: dateOptions.forcedTzo != null ?
dateOptions.forcedTzo :
this.offsetForMarker(marker),
}, this);
};
DateEnv.prototype.formatRange = function (start, end, formatter, dateOptions) {
if (dateOptions === void 0) { dateOptions = {}; }
if (dateOptions.isEndExclusive) {
end = addMs(end, -1);
}
return formatter.formatRange({
marker: start,
timeZoneOffset: dateOptions.forcedStartTzo != null ?
dateOptions.forcedStartTzo :
this.offsetForMarker(start),
}, {
marker: end,
timeZoneOffset: dateOptions.forcedEndTzo != null ?
dateOptions.forcedEndTzo :
this.offsetForMarker(end),
}, this, dateOptions.defaultSeparator);
};
/*
DUMB: the omitTime arg is dumb. if we omit the time, we want to omit the timezone offset. and if we do that,
might as well use buildIsoString or some other util directly
*/
DateEnv.prototype.formatIso = function (marker, extraOptions) {
if (extraOptions === void 0) { extraOptions = {}; }
var timeZoneOffset = null;
if (!extraOptions.omitTimeZoneOffset) {
if (extraOptions.forcedTzo != null) {
timeZoneOffset = extraOptions.forcedTzo;
}
else {
timeZoneOffset = this.offsetForMarker(marker);
}
}
return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime);
};
// TimeZone
DateEnv.prototype.timestampToMarker = function (ms) {
if (this.timeZone === 'local') {
return arrayToUtcDate(dateToLocalArray(new Date(ms)));
}
if (this.timeZone === 'UTC' || !this.namedTimeZoneImpl) {
return new Date(ms);
}
return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms));
};
DateEnv.prototype.offsetForMarker = function (m) {
if (this.timeZone === 'local') {
return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset(); // convert "inverse" offset to "normal" offset
}
if (this.timeZone === 'UTC') {
return 0;
}
if (this.namedTimeZoneImpl) {
return this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m));
}
return null;
};
// Conversion
DateEnv.prototype.toDate = function (m, forcedTzo) {
if (this.timeZone === 'local') {
return arrayToLocalDate(dateToUtcArray(m));
}
if (this.timeZone === 'UTC') {
return new Date(m.valueOf()); // make sure it's a copy
}
if (!this.namedTimeZoneImpl) {
return new Date(m.valueOf() - (forcedTzo || 0));
}
return new Date(m.valueOf() -
this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)) * 1000 * 60);
};
return DateEnv;
}());
var globalLocales = [];
var MINIMAL_RAW_EN_LOCALE = {
code: 'en',
week: {
dow: 0,
doy: 4, // 4 days need to be within the year to be considered the first week
},
direction: 'ltr',
buttonText: {
prev: 'prev',
next: 'next',
prevYear: 'prev year',
nextYear: 'next year',
year: 'year',
today: 'today',
month: 'month',
week: 'week',
day: 'day',
list: 'list',
},
weekText: 'W',
weekTextLong: 'Week',
closeHint: 'Close',
timeHint: 'Time',
eventHint: 'Event',
allDayText: 'all-day',
moreLinkText: 'more',
noEventsText: 'No events to display',
};
var RAW_EN_LOCALE = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, MINIMAL_RAW_EN_LOCALE), {
// Includes things we don't want other locales to inherit,
// things that derive from other translatable strings.
buttonHints: {
prev: 'Previous $0',
next: 'Next $0',
today: function (buttonText, unit) {
return (unit === 'day')
? 'Today'
: "This " + buttonText;
},
}, viewHint: '$0 view', navLinkHint: 'Go to $0', moreLinkHint: function (eventCnt) {
return "Show " + eventCnt + " more event" + (eventCnt === 1 ? '' : 's');
} });
function organizeRawLocales(explicitRawLocales) {
var defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en';
var allRawLocales = globalLocales.concat(explicitRawLocales);
var rawLocaleMap = {
en: RAW_EN_LOCALE,
};
for (var _i = 0, allRawLocales_1 = allRawLocales; _i < allRawLocales_1.length; _i++) {
var rawLocale = allRawLocales_1[_i];
rawLocaleMap[rawLocale.code] = rawLocale;
}
return {
map: rawLocaleMap,
defaultCode: defaultCode,
};
}
function buildLocale(inputSingular, available) {
if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {
return parseLocale(inputSingular.code, [inputSingular.code], inputSingular);
}
return queryLocale(inputSingular, available);
}
function queryLocale(codeArg, available) {
var codes = [].concat(codeArg || []); // will convert to array
var raw = queryRawLocale(codes, available) || RAW_EN_LOCALE;
return parseLocale(codeArg, codes, raw);
}
function queryRawLocale(codes, available) {
for (var i = 0; i < codes.length; i += 1) {
var parts = codes[i].toLocaleLowerCase().split('-');
for (var j = parts.length; j > 0; j -= 1) {
var simpleId = parts.slice(0, j).join('-');
if (available[simpleId]) {
return available[simpleId];
}
}
}
return null;
}
function parseLocale(codeArg, codes, raw) {
var merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']);
delete merged.code; // don't want this part of the options
var week = merged.week;
delete merged.week;
return {
codeArg: codeArg,
codes: codes,
week: week,
simpleNumberFormat: new Intl.NumberFormat(codeArg),
options: merged,
};
}
function formatDate(dateInput, options) {
if (options === void 0) { options = {}; }
var dateEnv = buildDateEnv$1(options);
var formatter = createFormatter(options);
var dateMeta = dateEnv.createMarkerMeta(dateInput);
if (!dateMeta) { // TODO: warning?
return '';
}
return dateEnv.format(dateMeta.marker, formatter, {
forcedTzo: dateMeta.forcedTzo,
});
}
function formatRange(startInput, endInput, options) {
var dateEnv = buildDateEnv$1(typeof options === 'object' && options ? options : {}); // pass in if non-null object
var formatter = createFormatter(options);
var startMeta = dateEnv.createMarkerMeta(startInput);
var endMeta = dateEnv.createMarkerMeta(endInput);
if (!startMeta || !endMeta) { // TODO: warning?
return '';
}
return dateEnv.formatRange(startMeta.marker, endMeta.marker, formatter, {
forcedStartTzo: startMeta.forcedTzo,
forcedEndTzo: endMeta.forcedTzo,
isEndExclusive: options.isEndExclusive,
defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator,
});
}
// TODO: more DRY and optimized
function buildDateEnv$1(settings) {
var locale = buildLocale(settings.locale || 'en', organizeRawLocales([]).map); // TODO: don't hardcode 'en' everywhere
return new DateEnv((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ timeZone: BASE_OPTION_DEFAULTS.timeZone, calendarSystem: 'gregory' }, settings), { locale: locale }));
}
var DEF_DEFAULTS = {
startTime: '09:00',
endTime: '17:00',
daysOfWeek: [1, 2, 3, 4, 5],
display: 'inverse-background',
classNames: 'fc-non-business',
groupId: '_businessHours', // so multiple defs get grouped
};
/*
TODO: pass around as EventDefHash!!!
*/
function parseBusinessHours(input, context) {
return parseEvents(refineInputs(input), null, context);
}
function refineInputs(input) {
var rawDefs;
if (input === true) {
rawDefs = [{}]; // will get DEF_DEFAULTS verbatim
}
else if (Array.isArray(input)) {
// if specifying an array, every sub-definition NEEDS a day-of-week
rawDefs = input.filter(function (rawDef) { return rawDef.daysOfWeek; });
}
else if (typeof input === 'object' && input) { // non-null object
rawDefs = [input];
}
else { // is probably false
rawDefs = [];
}
rawDefs = rawDefs.map(function (rawDef) { return ((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, DEF_DEFAULTS), rawDef)); });
return rawDefs;
}
function pointInsideRect(point, rect) {
return point.left >= rect.left &&
point.left < rect.right &&
point.top >= rect.top &&
point.top < rect.bottom;
}
// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false
function intersectRects(rect1, rect2) {
var res = {
left: Math.max(rect1.left, rect2.left),
right: Math.min(rect1.right, rect2.right),
top: Math.max(rect1.top, rect2.top),
bottom: Math.min(rect1.bottom, rect2.bottom),
};
if (res.left < res.right && res.top < res.bottom) {
return res;
}
return false;
}
function translateRect(rect, deltaX, deltaY) {
return {
left: rect.left + deltaX,
right: rect.right + deltaX,
top: rect.top + deltaY,
bottom: rect.bottom + deltaY,
};
}
// Returns a new point that will have been moved to reside within the given rectangle
function constrainPoint(point, rect) {
return {
left: Math.min(Math.max(point.left, rect.left), rect.right),
top: Math.min(Math.max(point.top, rect.top), rect.bottom),
};
}
// Returns a point that is the center of the given rectangle
function getRectCenter(rect) {
return {
left: (rect.left + rect.right) / 2,
top: (rect.top + rect.bottom) / 2,
};
}
// Subtracts point2's coordinates from point1's coordinates, returning a delta
function diffPoints(point1, point2) {
return {
left: point1.left - point2.left,
top: point1.top - point2.top,
};
}
var canVGrowWithinCell;
function getCanVGrowWithinCell() {
if (canVGrowWithinCell == null) {
canVGrowWithinCell = computeCanVGrowWithinCell();
}
return canVGrowWithinCell;
}
function computeCanVGrowWithinCell() {
// for SSR, because this function is call immediately at top-level
// TODO: just make this logic execute top-level, immediately, instead of doing lazily
if (typeof document === 'undefined') {
return true;
}
var el = document.createElement('div');
el.style.position = 'absolute';
el.style.top = '0px';
el.style.left = '0px';
el.innerHTML = '
';
el.querySelector('table').style.height = '100px';
el.querySelector('div').style.height = '100%';
document.body.appendChild(el);
var div = el.querySelector('div');
var possible = div.offsetHeight > 0;
document.body.removeChild(el);
return possible;
}
var EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere
var Splitter = /** @class */ (function () {
function Splitter() {
this.getKeysForEventDefs = memoize(this._getKeysForEventDefs);
this.splitDateSelection = memoize(this._splitDateSpan);
this.splitEventStore = memoize(this._splitEventStore);
this.splitIndividualUi = memoize(this._splitIndividualUi);
this.splitEventDrag = memoize(this._splitInteraction);
this.splitEventResize = memoize(this._splitInteraction);
this.eventUiBuilders = {}; // TODO: typescript protection
}
Splitter.prototype.splitProps = function (props) {
var _this = this;
var keyInfos = this.getKeyInfo(props);
var defKeys = this.getKeysForEventDefs(props.eventStore);
var dateSelections = this.splitDateSelection(props.dateSelection);
var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases*
var eventStores = this.splitEventStore(props.eventStore, defKeys);
var eventDrags = this.splitEventDrag(props.eventDrag);
var eventResizes = this.splitEventResize(props.eventResize);
var splitProps = {};
this.eventUiBuilders = mapHash(keyInfos, function (info, key) { return _this.eventUiBuilders[key] || memoize(buildEventUiForKey); });
for (var key in keyInfos) {
var keyInfo = keyInfos[key];
var eventStore = eventStores[key] || EMPTY_EVENT_STORE;
var buildEventUi = this.eventUiBuilders[key];
splitProps[key] = {
businessHours: keyInfo.businessHours || props.businessHours,
dateSelection: dateSelections[key] || null,
eventStore: eventStore,
eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),
eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',
eventDrag: eventDrags[key] || null,
eventResize: eventResizes[key] || null,
};
}
return splitProps;
};
Splitter.prototype._splitDateSpan = function (dateSpan) {
var dateSpans = {};
if (dateSpan) {
var keys = this.getKeysForDateSpan(dateSpan);
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
var key = keys_1[_i];
dateSpans[key] = dateSpan;
}
}
return dateSpans;
};
Splitter.prototype._getKeysForEventDefs = function (eventStore) {
var _this = this;
return mapHash(eventStore.defs, function (eventDef) { return _this.getKeysForEventDef(eventDef); });
};
Splitter.prototype._splitEventStore = function (eventStore, defKeys) {
var defs = eventStore.defs, instances = eventStore.instances;
var splitStores = {};
for (var defId in defs) {
for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {
var key = _a[_i];
if (!splitStores[key]) {
splitStores[key] = createEmptyEventStore();
}
splitStores[key].defs[defId] = defs[defId];
}
}
for (var instanceId in instances) {
var instance = instances[instanceId];
for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) {
var key = _c[_b];
if (splitStores[key]) { // must have already been created
splitStores[key].instances[instanceId] = instance;
}
}
}
return splitStores;
};
Splitter.prototype._splitIndividualUi = function (eventUiBases, defKeys) {
var splitHashes = {};
for (var defId in eventUiBases) {
if (defId) { // not the '' key
for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {
var key = _a[_i];
if (!splitHashes[key]) {
splitHashes[key] = {};
}
splitHashes[key][defId] = eventUiBases[defId];
}
}
}
return splitHashes;
};
Splitter.prototype._splitInteraction = function (interaction) {
var splitStates = {};
if (interaction) {
var affectedStores_1 = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents));
// can't rely on defKeys because event data is mutated
var mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents);
var mutatedStores_1 = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId);
var populate = function (key) {
if (!splitStates[key]) {
splitStates[key] = {
affectedEvents: affectedStores_1[key] || EMPTY_EVENT_STORE,
mutatedEvents: mutatedStores_1[key] || EMPTY_EVENT_STORE,
isEvent: interaction.isEvent,
};
}
};
for (var key in affectedStores_1) {
populate(key);
}
for (var key in mutatedStores_1) {
populate(key);
}
}
return splitStates;
};
return Splitter;
}());
function buildEventUiForKey(allUi, eventUiForKey, individualUi) {
var baseParts = [];
if (allUi) {
baseParts.push(allUi);
}
if (eventUiForKey) {
baseParts.push(eventUiForKey);
}
var stuff = {
'': combineEventUis(baseParts),
};
if (individualUi) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(stuff, individualUi);
}
return stuff;
}
function getDateMeta(date, todayRange, nowDate, dateProfile) {
return {
dow: date.getUTCDay(),
isDisabled: Boolean(dateProfile && !rangeContainsMarker(dateProfile.activeRange, date)),
isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)),
isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)),
isPast: Boolean(nowDate ? (date < nowDate) : todayRange ? (date < todayRange.start) : false),
isFuture: Boolean(nowDate ? (date > nowDate) : todayRange ? (date >= todayRange.end) : false),
};
}
function getDayClassNames(meta, theme) {
var classNames = [
'fc-day',
"fc-day-" + DAY_IDS[meta.dow],
];
if (meta.isDisabled) {
classNames.push('fc-day-disabled');
}
else {
if (meta.isToday) {
classNames.push('fc-day-today');
classNames.push(theme.getClass('today'));
}
if (meta.isPast) {
classNames.push('fc-day-past');
}
if (meta.isFuture) {
classNames.push('fc-day-future');
}
if (meta.isOther) {
classNames.push('fc-day-other');
}
}
return classNames;
}
function getSlotClassNames(meta, theme) {
var classNames = [
'fc-slot',
"fc-slot-" + DAY_IDS[meta.dow],
];
if (meta.isDisabled) {
classNames.push('fc-slot-disabled');
}
else {
if (meta.isToday) {
classNames.push('fc-slot-today');
classNames.push(theme.getClass('today'));
}
if (meta.isPast) {
classNames.push('fc-slot-past');
}
if (meta.isFuture) {
classNames.push('fc-slot-future');
}
}
return classNames;
}
var DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });
var WEEK_FORMAT = createFormatter({ week: 'long' });
function buildNavLinkAttrs(context, dateMarker, viewType, isTabbable) {
if (viewType === void 0) { viewType = 'day'; }
if (isTabbable === void 0) { isTabbable = true; }
var dateEnv = context.dateEnv, options = context.options, calendarApi = context.calendarApi;
var dateStr = dateEnv.format(dateMarker, viewType === 'week' ? WEEK_FORMAT : DAY_FORMAT);
if (options.navLinks) {
var zonedDate = dateEnv.toDate(dateMarker);
var handleInteraction = function (ev) {
var customAction = viewType === 'day' ? options.navLinkDayClick :
viewType === 'week' ? options.navLinkWeekClick : null;
if (typeof customAction === 'function') {
customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev);
}
else {
if (typeof customAction === 'string') {
viewType = customAction;
}
calendarApi.zoomTo(dateMarker, viewType);
}
};
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr), 'data-navlink': '' }, (isTabbable
? createAriaClickAttrs(handleInteraction)
: { onClick: handleInteraction }));
}
return { 'aria-label': dateStr };
}
var _isRtlScrollbarOnLeft = null;
function getIsRtlScrollbarOnLeft() {
if (_isRtlScrollbarOnLeft === null) {
_isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft();
}
return _isRtlScrollbarOnLeft;
}
function computeIsRtlScrollbarOnLeft() {
var outerEl = document.createElement('div');
applyStyle(outerEl, {
position: 'absolute',
top: -1000,
left: 0,
border: 0,
padding: 0,
overflow: 'scroll',
direction: 'rtl',
});
outerEl.innerHTML = '
';
document.body.appendChild(outerEl);
var innerEl = outerEl.firstChild;
var res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left;
removeElement(outerEl);
return res;
}
var _scrollbarWidths;
function getScrollbarWidths() {
if (!_scrollbarWidths) {
_scrollbarWidths = computeScrollbarWidths();
}
return _scrollbarWidths;
}
function computeScrollbarWidths() {
var el = document.createElement('div');
el.style.overflow = 'scroll';
el.style.position = 'absolute';
el.style.top = '-9999px';
el.style.left = '-9999px';
document.body.appendChild(el);
var res = computeScrollbarWidthsForEl(el);
document.body.removeChild(el);
return res;
}
// WARNING: will include border
function computeScrollbarWidthsForEl(el) {
return {
x: el.offsetHeight - el.clientHeight,
y: el.offsetWidth - el.clientWidth,
};
}
function computeEdges(el, getPadding) {
if (getPadding === void 0) { getPadding = false; }
var computedStyle = window.getComputedStyle(el);
var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0;
var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0;
var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0;
var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;
var badScrollbarWidths = computeScrollbarWidthsForEl(el); // includes border!
var scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight;
var scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom;
var res = {
borderLeft: borderLeft,
borderRight: borderRight,
borderTop: borderTop,
borderBottom: borderBottom,
scrollbarBottom: scrollbarBottom,
scrollbarLeft: 0,
scrollbarRight: 0,
};
if (getIsRtlScrollbarOnLeft() && computedStyle.direction === 'rtl') { // is the scrollbar on the left side?
res.scrollbarLeft = scrollbarLeftRight;
}
else {
res.scrollbarRight = scrollbarLeftRight;
}
if (getPadding) {
res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0;
res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0;
res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0;
res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0;
}
return res;
}
function computeInnerRect(el, goWithinPadding, doFromWindowViewport) {
if (goWithinPadding === void 0) { goWithinPadding = false; }
var outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el);
var edges = computeEdges(el, goWithinPadding);
var res = {
left: outerRect.left + edges.borderLeft + edges.scrollbarLeft,
right: outerRect.right - edges.borderRight - edges.scrollbarRight,
top: outerRect.top + edges.borderTop,
bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom,
};
if (goWithinPadding) {
res.left += edges.paddingLeft;
res.right -= edges.paddingRight;
res.top += edges.paddingTop;
res.bottom -= edges.paddingBottom;
}
return res;
}
function computeRect(el) {
var rect = el.getBoundingClientRect();
return {
left: rect.left + window.pageXOffset,
top: rect.top + window.pageYOffset,
right: rect.right + window.pageXOffset,
bottom: rect.bottom + window.pageYOffset,
};
}
function computeClippedClientRect(el) {
var clippingParents = getClippingParents(el);
var rect = el.getBoundingClientRect();
for (var _i = 0, clippingParents_1 = clippingParents; _i < clippingParents_1.length; _i++) {
var clippingParent = clippingParents_1[_i];
var intersection = intersectRects(rect, clippingParent.getBoundingClientRect());
if (intersection) {
rect = intersection;
}
else {
return null;
}
}
return rect;
}
function computeHeightAndMargins(el) {
return el.getBoundingClientRect().height + computeVMargins(el);
}
function computeVMargins(el) {
var computed = window.getComputedStyle(el);
return parseInt(computed.marginTop, 10) +
parseInt(computed.marginBottom, 10);
}
// does not return window
function getClippingParents(el) {
var parents = [];
while (el instanceof HTMLElement) { // will stop when gets to document or null
var computedStyle = window.getComputedStyle(el);
if (computedStyle.position === 'fixed') {
break;
}
if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {
parents.push(el);
}
el = el.parentNode;
}
return parents;
}
// given a function that resolves a result asynchronously.
// the function can either call passed-in success and failure callbacks,
// or it can return a promise.
// if you need to pass additional params to func, bind them first.
function unpromisify(func, success, failure) {
// guard against success/failure callbacks being called more than once
// and guard against a promise AND callback being used together.
var isResolved = false;
var wrappedSuccess = function () {
if (!isResolved) {
isResolved = true;
success.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
};
var wrappedFailure = function () {
if (!isResolved) {
isResolved = true;
if (failure) {
failure.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
}
};
var res = func(wrappedSuccess, wrappedFailure);
if (res && typeof res.then === 'function') {
res.then(wrappedSuccess, wrappedFailure);
}
}
var Emitter = /** @class */ (function () {
function Emitter() {
this.handlers = {};
this.thisContext = null;
}
Emitter.prototype.setThisContext = function (thisContext) {
this.thisContext = thisContext;
};
Emitter.prototype.setOptions = function (options) {
this.options = options;
};
Emitter.prototype.on = function (type, handler) {
addToHash(this.handlers, type, handler);
};
Emitter.prototype.off = function (type, handler) {
removeFromHash(this.handlers, type, handler);
};
Emitter.prototype.trigger = function (type) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var attachedHandlers = this.handlers[type] || [];
var optionHandler = this.options && this.options[type];
var handlers = [].concat(optionHandler || [], attachedHandlers);
for (var _a = 0, handlers_1 = handlers; _a < handlers_1.length; _a++) {
var handler = handlers_1[_a];
handler.apply(this.thisContext, args);
}
};
Emitter.prototype.hasHandlers = function (type) {
return Boolean((this.handlers[type] && this.handlers[type].length) ||
(this.options && this.options[type]));
};
return Emitter;
}());
function addToHash(hash, type, handler) {
(hash[type] || (hash[type] = []))
.push(handler);
}
function removeFromHash(hash, type, handler) {
if (handler) {
if (hash[type]) {
hash[type] = hash[type].filter(function (func) { return func !== handler; });
}
}
else {
delete hash[type]; // remove all handler funcs for this type
}
}
/*
Records offset information for a set of elements, relative to an origin element.
Can record the left/right OR the top/bottom OR both.
Provides methods for querying the cache by position.
*/
var PositionCache = /** @class */ (function () {
function PositionCache(originEl, els, isHorizontal, isVertical) {
this.els = els;
var originClientRect = this.originClientRect = originEl.getBoundingClientRect(); // relative to viewport top-left
if (isHorizontal) {
this.buildElHorizontals(originClientRect.left);
}
if (isVertical) {
this.buildElVerticals(originClientRect.top);
}
}
// Populates the left/right internal coordinate arrays
PositionCache.prototype.buildElHorizontals = function (originClientLeft) {
var lefts = [];
var rights = [];
for (var _i = 0, _a = this.els; _i < _a.length; _i++) {
var el = _a[_i];
var rect = el.getBoundingClientRect();
lefts.push(rect.left - originClientLeft);
rights.push(rect.right - originClientLeft);
}
this.lefts = lefts;
this.rights = rights;
};
// Populates the top/bottom internal coordinate arrays
PositionCache.prototype.buildElVerticals = function (originClientTop) {
var tops = [];
var bottoms = [];
for (var _i = 0, _a = this.els; _i < _a.length; _i++) {
var el = _a[_i];
var rect = el.getBoundingClientRect();
tops.push(rect.top - originClientTop);
bottoms.push(rect.bottom - originClientTop);
}
this.tops = tops;
this.bottoms = bottoms;
};
// Given a left offset (from document left), returns the index of the el that it horizontally intersects.
// If no intersection is made, returns undefined.
PositionCache.prototype.leftToIndex = function (leftPosition) {
var _a = this, lefts = _a.lefts, rights = _a.rights;
var len = lefts.length;
var i;
for (i = 0; i < len; i += 1) {
if (leftPosition >= lefts[i] && leftPosition < rights[i]) {
return i;
}
}
return undefined; // TODO: better
};
// Given a top offset (from document top), returns the index of the el that it vertically intersects.
// If no intersection is made, returns undefined.
PositionCache.prototype.topToIndex = function (topPosition) {
var _a = this, tops = _a.tops, bottoms = _a.bottoms;
var len = tops.length;
var i;
for (i = 0; i < len; i += 1) {
if (topPosition >= tops[i] && topPosition < bottoms[i]) {
return i;
}
}
return undefined; // TODO: better
};
// Gets the width of the element at the given index
PositionCache.prototype.getWidth = function (leftIndex) {
return this.rights[leftIndex] - this.lefts[leftIndex];
};
// Gets the height of the element at the given index
PositionCache.prototype.getHeight = function (topIndex) {
return this.bottoms[topIndex] - this.tops[topIndex];
};
return PositionCache;
}());
/* eslint max-classes-per-file: "off" */
/*
An object for getting/setting scroll-related information for an element.
Internally, this is done very differently for window versus DOM element,
so this object serves as a common interface.
*/
var ScrollController = /** @class */ (function () {
function ScrollController() {
}
ScrollController.prototype.getMaxScrollTop = function () {
return this.getScrollHeight() - this.getClientHeight();
};
ScrollController.prototype.getMaxScrollLeft = function () {
return this.getScrollWidth() - this.getClientWidth();
};
ScrollController.prototype.canScrollVertically = function () {
return this.getMaxScrollTop() > 0;
};
ScrollController.prototype.canScrollHorizontally = function () {
return this.getMaxScrollLeft() > 0;
};
ScrollController.prototype.canScrollUp = function () {
return this.getScrollTop() > 0;
};
ScrollController.prototype.canScrollDown = function () {
return this.getScrollTop() < this.getMaxScrollTop();
};
ScrollController.prototype.canScrollLeft = function () {
return this.getScrollLeft() > 0;
};
ScrollController.prototype.canScrollRight = function () {
return this.getScrollLeft() < this.getMaxScrollLeft();
};
return ScrollController;
}());
var ElementScrollController = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ElementScrollController, _super);
function ElementScrollController(el) {
var _this = _super.call(this) || this;
_this.el = el;
return _this;
}
ElementScrollController.prototype.getScrollTop = function () {
return this.el.scrollTop;
};
ElementScrollController.prototype.getScrollLeft = function () {
return this.el.scrollLeft;
};
ElementScrollController.prototype.setScrollTop = function (top) {
this.el.scrollTop = top;
};
ElementScrollController.prototype.setScrollLeft = function (left) {
this.el.scrollLeft = left;
};
ElementScrollController.prototype.getScrollWidth = function () {
return this.el.scrollWidth;
};
ElementScrollController.prototype.getScrollHeight = function () {
return this.el.scrollHeight;
};
ElementScrollController.prototype.getClientHeight = function () {
return this.el.clientHeight;
};
ElementScrollController.prototype.getClientWidth = function () {
return this.el.clientWidth;
};
return ElementScrollController;
}(ScrollController));
var WindowScrollController = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(WindowScrollController, _super);
function WindowScrollController() {
return _super !== null && _super.apply(this, arguments) || this;
}
WindowScrollController.prototype.getScrollTop = function () {
return window.pageYOffset;
};
WindowScrollController.prototype.getScrollLeft = function () {
return window.pageXOffset;
};
WindowScrollController.prototype.setScrollTop = function (n) {
window.scroll(window.pageXOffset, n);
};
WindowScrollController.prototype.setScrollLeft = function (n) {
window.scroll(n, window.pageYOffset);
};
WindowScrollController.prototype.getScrollWidth = function () {
return document.documentElement.scrollWidth;
};
WindowScrollController.prototype.getScrollHeight = function () {
return document.documentElement.scrollHeight;
};
WindowScrollController.prototype.getClientHeight = function () {
return document.documentElement.clientHeight;
};
WindowScrollController.prototype.getClientWidth = function () {
return document.documentElement.clientWidth;
};
return WindowScrollController;
}(ScrollController));
var Theme = /** @class */ (function () {
function Theme(calendarOptions) {
if (this.iconOverrideOption) {
this.setIconOverride(calendarOptions[this.iconOverrideOption]);
}
}
Theme.prototype.setIconOverride = function (iconOverrideHash) {
var iconClassesCopy;
var buttonName;
if (typeof iconOverrideHash === 'object' && iconOverrideHash) { // non-null object
iconClassesCopy = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, this.iconClasses);
for (buttonName in iconOverrideHash) {
iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]);
}
this.iconClasses = iconClassesCopy;
}
else if (iconOverrideHash === false) {
this.iconClasses = {};
}
};
Theme.prototype.applyIconOverridePrefix = function (className) {
var prefix = this.iconOverridePrefix;
if (prefix && className.indexOf(prefix) !== 0) { // if not already present
className = prefix + className;
}
return className;
};
Theme.prototype.getClass = function (key) {
return this.classes[key] || '';
};
Theme.prototype.getIconClass = function (buttonName, isRtl) {
var className;
if (isRtl && this.rtlIconClasses) {
className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName];
}
else {
className = this.iconClasses[buttonName];
}
if (className) {
return this.baseIconClass + " " + className;
}
return '';
};
Theme.prototype.getCustomButtonIconClass = function (customButtonProps) {
var className;
if (this.iconOverrideCustomButtonOption) {
className = customButtonProps[this.iconOverrideCustomButtonOption];
if (className) {
return this.baseIconClass + " " + this.applyIconOverridePrefix(className);
}
}
return '';
};
return Theme;
}());
Theme.prototype.classes = {};
Theme.prototype.iconClasses = {};
Theme.prototype.baseIconClass = '';
Theme.prototype.iconOverridePrefix = '';
var ScrollResponder = /** @class */ (function () {
function ScrollResponder(execFunc, emitter, scrollTime, scrollTimeReset) {
var _this = this;
this.execFunc = execFunc;
this.emitter = emitter;
this.scrollTime = scrollTime;
this.scrollTimeReset = scrollTimeReset;
this.handleScrollRequest = function (request) {
_this.queuedRequest = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, _this.queuedRequest || {}, request);
_this.drain();
};
emitter.on('_scrollRequest', this.handleScrollRequest);
this.fireInitialScroll();
}
ScrollResponder.prototype.detach = function () {
this.emitter.off('_scrollRequest', this.handleScrollRequest);
};
ScrollResponder.prototype.update = function (isDatesNew) {
if (isDatesNew && this.scrollTimeReset) {
this.fireInitialScroll(); // will drain
}
else {
this.drain();
}
};
ScrollResponder.prototype.fireInitialScroll = function () {
this.handleScrollRequest({
time: this.scrollTime,
});
};
ScrollResponder.prototype.drain = function () {
if (this.queuedRequest && this.execFunc(this.queuedRequest)) {
this.queuedRequest = null;
}
};
return ScrollResponder;
}());
var ViewContextType = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createContext)({}); // for Components
function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) {
return {
dateEnv: dateEnv,
options: viewOptions,
pluginHooks: pluginHooks,
emitter: emitter,
dispatch: dispatch,
getCurrentData: getCurrentData,
calendarApi: calendarApi,
viewSpec: viewSpec,
viewApi: viewApi,
dateProfileGenerator: dateProfileGenerator,
theme: theme,
isRtl: viewOptions.direction === 'rtl',
addResizeHandler: function (handler) {
emitter.on('_resize', handler);
},
removeResizeHandler: function (handler) {
emitter.off('_resize', handler);
},
createScrollResponder: function (execFunc) {
return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime), viewOptions.scrollTimeReset);
},
registerInteractiveComponent: registerInteractiveComponent,
unregisterInteractiveComponent: unregisterInteractiveComponent,
};
}
/* eslint max-classes-per-file: off */
var PureComponent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(PureComponent, _super);
function PureComponent() {
return _super !== null && _super.apply(this, arguments) || this;
}
PureComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
if (this.debug) {
// eslint-disable-next-line no-console
// console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state));
}
return !compareObjs(this.props, nextProps, this.propEquality) ||
!compareObjs(this.state, nextState, this.stateEquality);
};
PureComponent.addPropsEquality = addPropsEquality;
PureComponent.addStateEquality = addStateEquality;
PureComponent.contextType = ViewContextType;
return PureComponent;
}(_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Component));
PureComponent.prototype.propEquality = {};
PureComponent.prototype.stateEquality = {};
var BaseComponent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(BaseComponent, _super);
function BaseComponent() {
return _super !== null && _super.apply(this, arguments) || this;
}
BaseComponent.contextType = ViewContextType;
return BaseComponent;
}(PureComponent));
function addPropsEquality(propEquality) {
var hash = Object.create(this.prototype.propEquality);
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(hash, propEquality);
this.prototype.propEquality = hash;
}
function addStateEquality(stateEquality) {
var hash = Object.create(this.prototype.stateEquality);
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(hash, stateEquality);
this.prototype.stateEquality = hash;
}
// use other one
function setRef(ref, current) {
if (typeof ref === 'function') {
ref(current);
}
else if (ref) {
// see https://github.com/facebook/react/issues/13029
ref.current = current;
}
}
/*
an INTERACTABLE date component
PURPOSES:
- hook up to fg, fill, and mirror renderers
- interface for dragging and hits
*/
var DateComponent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DateComponent, _super);
function DateComponent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.uid = guid();
return _this;
}
// Hit System
// -----------------------------------------------------------------------------------------------------------------
DateComponent.prototype.prepareHits = function () {
};
DateComponent.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {
return null; // this should be abstract
};
// Pointer Interaction Utils
// -----------------------------------------------------------------------------------------------------------------
DateComponent.prototype.isValidSegDownEl = function (el) {
return !this.props.eventDrag && // HACK
!this.props.eventResize && // HACK
!elementClosest(el, '.fc-event-mirror');
};
DateComponent.prototype.isValidDateDownEl = function (el) {
return !elementClosest(el, '.fc-event:not(.fc-bg-event)') &&
!elementClosest(el, '.fc-more-link') && // a "more.." link
!elementClosest(el, 'a[data-navlink]') && // a clickable nav link
!elementClosest(el, '.fc-popover'); // hack
};
return DateComponent;
}(BaseComponent));
// TODO: easier way to add new hooks? need to update a million things
function createPlugin(input) {
return {
id: guid(),
deps: input.deps || [],
reducers: input.reducers || [],
isLoadingFuncs: input.isLoadingFuncs || [],
contextInit: [].concat(input.contextInit || []),
eventRefiners: input.eventRefiners || {},
eventDefMemberAdders: input.eventDefMemberAdders || [],
eventSourceRefiners: input.eventSourceRefiners || {},
isDraggableTransformers: input.isDraggableTransformers || [],
eventDragMutationMassagers: input.eventDragMutationMassagers || [],
eventDefMutationAppliers: input.eventDefMutationAppliers || [],
dateSelectionTransformers: input.dateSelectionTransformers || [],
datePointTransforms: input.datePointTransforms || [],
dateSpanTransforms: input.dateSpanTransforms || [],
views: input.views || {},
viewPropsTransformers: input.viewPropsTransformers || [],
isPropsValid: input.isPropsValid || null,
externalDefTransforms: input.externalDefTransforms || [],
viewContainerAppends: input.viewContainerAppends || [],
eventDropTransformers: input.eventDropTransformers || [],
componentInteractions: input.componentInteractions || [],
calendarInteractions: input.calendarInteractions || [],
themeClasses: input.themeClasses || {},
eventSourceDefs: input.eventSourceDefs || [],
cmdFormatter: input.cmdFormatter,
recurringTypes: input.recurringTypes || [],
namedTimeZonedImpl: input.namedTimeZonedImpl,
initialView: input.initialView || '',
elementDraggingImpl: input.elementDraggingImpl,
optionChangeHandlers: input.optionChangeHandlers || {},
scrollGridImpl: input.scrollGridImpl || null,
contentTypeHandlers: input.contentTypeHandlers || {},
listenerRefiners: input.listenerRefiners || {},
optionRefiners: input.optionRefiners || {},
propSetHandlers: input.propSetHandlers || {},
};
}
function buildPluginHooks(pluginDefs, globalDefs) {
var isAdded = {};
var hooks = {
reducers: [],
isLoadingFuncs: [],
contextInit: [],
eventRefiners: {},
eventDefMemberAdders: [],
eventSourceRefiners: {},
isDraggableTransformers: [],
eventDragMutationMassagers: [],
eventDefMutationAppliers: [],
dateSelectionTransformers: [],
datePointTransforms: [],
dateSpanTransforms: [],
views: {},
viewPropsTransformers: [],
isPropsValid: null,
externalDefTransforms: [],
viewContainerAppends: [],
eventDropTransformers: [],
componentInteractions: [],
calendarInteractions: [],
themeClasses: {},
eventSourceDefs: [],
cmdFormatter: null,
recurringTypes: [],
namedTimeZonedImpl: null,
initialView: '',
elementDraggingImpl: null,
optionChangeHandlers: {},
scrollGridImpl: null,
contentTypeHandlers: {},
listenerRefiners: {},
optionRefiners: {},
propSetHandlers: {},
};
function addDefs(defs) {
for (var _i = 0, defs_1 = defs; _i < defs_1.length; _i++) {
var def = defs_1[_i];
if (!isAdded[def.id]) {
isAdded[def.id] = true;
addDefs(def.deps);
hooks = combineHooks(hooks, def);
}
}
}
if (pluginDefs) {
addDefs(pluginDefs);
}
addDefs(globalDefs);
return hooks;
}
function buildBuildPluginHooks() {
var currentOverrideDefs = [];
var currentGlobalDefs = [];
var currentHooks;
return function (overrideDefs, globalDefs) {
if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {
currentHooks = buildPluginHooks(overrideDefs, globalDefs);
}
currentOverrideDefs = overrideDefs;
currentGlobalDefs = globalDefs;
return currentHooks;
};
}
function combineHooks(hooks0, hooks1) {
return {
reducers: hooks0.reducers.concat(hooks1.reducers),
isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs),
contextInit: hooks0.contextInit.concat(hooks1.contextInit),
eventRefiners: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.eventRefiners), hooks1.eventRefiners),
eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),
eventSourceRefiners: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners),
isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),
eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),
eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),
dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),
datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),
dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),
views: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.views), hooks1.views),
viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),
isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,
externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),
viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),
eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),
calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),
componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),
themeClasses: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.themeClasses), hooks1.themeClasses),
eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),
cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,
recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),
namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,
initialView: hooks0.initialView || hooks1.initialView,
elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
optionChangeHandlers: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,
contentTypeHandlers: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.contentTypeHandlers), hooks1.contentTypeHandlers),
listenerRefiners: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
optionRefiners: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.optionRefiners), hooks1.optionRefiners),
propSetHandlers: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
};
}
var StandardTheme = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(StandardTheme, _super);
function StandardTheme() {
return _super !== null && _super.apply(this, arguments) || this;
}
return StandardTheme;
}(Theme));
StandardTheme.prototype.classes = {
root: 'fc-theme-standard',
tableCellShaded: 'fc-cell-shaded',
buttonGroup: 'fc-button-group',
button: 'fc-button fc-button-primary',
buttonActive: 'fc-button-active',
};
StandardTheme.prototype.baseIconClass = 'fc-icon';
StandardTheme.prototype.iconClasses = {
close: 'fc-icon-x',
prev: 'fc-icon-chevron-left',
next: 'fc-icon-chevron-right',
prevYear: 'fc-icon-chevrons-left',
nextYear: 'fc-icon-chevrons-right',
};
StandardTheme.prototype.rtlIconClasses = {
prev: 'fc-icon-chevron-right',
next: 'fc-icon-chevron-left',
prevYear: 'fc-icon-chevrons-right',
nextYear: 'fc-icon-chevrons-left',
};
StandardTheme.prototype.iconOverrideOption = 'buttonIcons'; // TODO: make TS-friendly
StandardTheme.prototype.iconOverrideCustomButtonOption = 'icon';
StandardTheme.prototype.iconOverridePrefix = 'fc-icon-';
function compileViewDefs(defaultConfigs, overrideConfigs) {
var hash = {};
var viewType;
for (viewType in defaultConfigs) {
ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);
}
for (viewType in overrideConfigs) {
ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);
}
return hash;
}
function ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) {
if (hash[viewType]) {
return hash[viewType];
}
var viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs);
if (viewDef) {
hash[viewType] = viewDef;
}
return viewDef;
}
function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {
var defaultConfig = defaultConfigs[viewType];
var overrideConfig = overrideConfigs[viewType];
var queryProp = function (name) { return ((defaultConfig && defaultConfig[name] !== null) ? defaultConfig[name] :
((overrideConfig && overrideConfig[name] !== null) ? overrideConfig[name] : null)); };
var theComponent = queryProp('component');
var superType = queryProp('superType');
var superDef = null;
if (superType) {
if (superType === viewType) {
throw new Error('Can\'t have a custom view type that references itself');
}
superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs);
}
if (!theComponent && superDef) {
theComponent = superDef.component;
}
if (!theComponent) {
return null; // don't throw a warning, might be settings for a single-unit view
}
return {
type: viewType,
component: theComponent,
defaults: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, (superDef ? superDef.defaults : {})), (defaultConfig ? defaultConfig.rawOptions : {})),
overrides: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, (superDef ? superDef.overrides : {})), (overrideConfig ? overrideConfig.rawOptions : {})),
};
}
/* eslint max-classes-per-file: off */
// NOTE: in JSX, you should always use this class with arg. otherwise, will default to any???
var RenderHook = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(RenderHook, _super);
function RenderHook() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.rootElRef = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.handleRootEl = function (el) {
setRef(_this.rootElRef, el);
if (_this.props.elRef) {
setRef(_this.props.elRef, el);
}
};
return _this;
}
RenderHook.prototype.render = function () {
var _this = this;
var props = this.props;
var hookProps = props.hookProps;
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(MountHook, { hookProps: hookProps, didMount: props.didMount, willUnmount: props.willUnmount, elRef: this.handleRootEl }, function (rootElRef) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ContentHook, { hookProps: hookProps, content: props.content, defaultContent: props.defaultContent, backupElRef: _this.rootElRef }, function (innerElRef, innerContent) { return props.children(rootElRef, normalizeClassNames(props.classNames, hookProps), innerElRef, innerContent); })); }));
};
return RenderHook;
}(BaseComponent));
// TODO: rename to be about function, not default. use in above type
// for forcing rerender of components that use the ContentHook
var CustomContentRenderContext = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createContext)(0);
function ContentHook(props) {
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomContentRenderContext.Consumer, null, function (renderId) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ContentHookInner, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ renderId: renderId }, props))); }));
}
var ContentHookInner = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ContentHookInner, _super);
function ContentHookInner() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.innerElRef = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
ContentHookInner.prototype.render = function () {
return this.props.children(this.innerElRef, this.renderInnerContent());
};
ContentHookInner.prototype.componentDidMount = function () {
this.updateCustomContent();
};
ContentHookInner.prototype.componentDidUpdate = function () {
this.updateCustomContent();
};
ContentHookInner.prototype.componentWillUnmount = function () {
if (this.customContentInfo && this.customContentInfo.destroy) {
this.customContentInfo.destroy();
}
};
ContentHookInner.prototype.renderInnerContent = function () {
var customContentInfo = this.customContentInfo; // only populated if using non-[p]react node(s)
var innerContent = this.getInnerContent();
var meta = this.getContentMeta(innerContent);
// initial run, or content-type changing? (from vue -> react for example)
if (!customContentInfo || customContentInfo.contentKey !== meta.contentKey) {
// clearing old value
if (customContentInfo) {
if (customContentInfo.destroy) {
customContentInfo.destroy();
}
customContentInfo = this.customContentInfo = null;
}
// assigning new value
if (meta.contentKey) {
customContentInfo = this.customContentInfo = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ contentKey: meta.contentKey, contentVal: innerContent[meta.contentKey] }, meta.buildLifecycleFuncs());
}
// updating
}
else if (customContentInfo) {
customContentInfo.contentVal = innerContent[meta.contentKey];
}
return customContentInfo
? [] // signal that something was specified
: innerContent; // assume a [p]react vdom node. use it
};
ContentHookInner.prototype.getInnerContent = function () {
var props = this.props;
var innerContent = normalizeContent(props.content, props.hookProps);
if (innerContent === undefined) { // use the default
innerContent = normalizeContent(props.defaultContent, props.hookProps);
}
return innerContent == null ? null : innerContent; // convert undefined to null (better for React)
};
ContentHookInner.prototype.getContentMeta = function (innerContent) {
var contentTypeHandlers = this.context.pluginHooks.contentTypeHandlers;
var contentKey = '';
var buildLifecycleFuncs = null;
if (innerContent) { // allowed to be null, for convenience to caller
for (var searchKey in contentTypeHandlers) {
if (innerContent[searchKey] !== undefined) {
contentKey = searchKey;
buildLifecycleFuncs = contentTypeHandlers[searchKey];
break;
}
}
}
return { contentKey: contentKey, buildLifecycleFuncs: buildLifecycleFuncs };
};
ContentHookInner.prototype.updateCustomContent = function () {
if (this.customContentInfo) { // for non-[p]react
this.customContentInfo.render(this.innerElRef.current || this.props.backupElRef.current, // the element to render into
this.customContentInfo.contentVal);
}
};
return ContentHookInner;
}(BaseComponent));
var MountHook = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(MountHook, _super);
function MountHook() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.handleRootEl = function (rootEl) {
_this.rootEl = rootEl;
if (_this.props.elRef) {
setRef(_this.props.elRef, rootEl);
}
};
return _this;
}
MountHook.prototype.render = function () {
return this.props.children(this.handleRootEl);
};
MountHook.prototype.componentDidMount = function () {
var callback = this.props.didMount;
if (callback) {
callback((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, this.props.hookProps), { el: this.rootEl }));
}
};
MountHook.prototype.componentWillUnmount = function () {
var callback = this.props.willUnmount;
if (callback) {
callback((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, this.props.hookProps), { el: this.rootEl }));
}
};
return MountHook;
}(BaseComponent));
function buildClassNameNormalizer() {
var currentGenerator;
var currentHookProps;
var currentClassNames = [];
return function (generator, hookProps) {
if (!currentHookProps || !isPropsEqual(currentHookProps, hookProps) || generator !== currentGenerator) {
currentGenerator = generator;
currentHookProps = hookProps;
currentClassNames = normalizeClassNames(generator, hookProps);
}
return currentClassNames;
};
}
function normalizeClassNames(classNames, hookProps) {
if (typeof classNames === 'function') {
classNames = classNames(hookProps);
}
return parseClassNames(classNames);
}
function normalizeContent(input, hookProps) {
if (typeof input === 'function') {
return input(hookProps, _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement); // give the function the vdom-creation func
}
return input;
}
var ViewRoot = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ViewRoot, _super);
function ViewRoot() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.normalizeClassNames = buildClassNameNormalizer();
return _this;
}
ViewRoot.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var options = context.options;
var hookProps = { view: context.viewApi };
var customClassNames = this.normalizeClassNames(options.viewClassNames, hookProps);
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(MountHook, { hookProps: hookProps, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount, elRef: props.elRef }, function (rootElRef) { return props.children(rootElRef, ["fc-" + props.viewSpec.type + "-view", 'fc-view'].concat(customClassNames)); }));
};
return ViewRoot;
}(BaseComponent));
function parseViewConfigs(inputs) {
return mapHash(inputs, parseViewConfig);
}
function parseViewConfig(input) {
var rawOptions = typeof input === 'function' ?
{ component: input } :
input;
var component = rawOptions.component;
if (rawOptions.content) {
component = createViewHookComponent(rawOptions);
// TODO: remove content/classNames/didMount/etc from options?
}
return {
superType: rawOptions.type,
component: component,
rawOptions: rawOptions,
};
}
function createViewHookComponent(options) {
return function (viewProps) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewContextType.Consumer, null, function (context) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewRoot, { viewSpec: context.viewSpec }, function (viewElRef, viewClassNames) {
var hookProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold });
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { hookProps: hookProps, classNames: options.classNames, content: options.content, didMount: options.didMount, willUnmount: options.willUnmount, elRef: viewElRef }, function (rootElRef, customClassNames, innerElRef, innerContent) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: viewClassNames.concat(customClassNames).join(' '), ref: rootElRef }, innerContent)); }));
})); })); };
}
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
var defaultConfigs = parseViewConfigs(defaultInputs);
var overrideConfigs = parseViewConfigs(optionOverrides.views);
var viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);
return mapHash(viewDefs, function (viewDef) { return buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults); });
}
function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
var durationInput = viewDef.overrides.duration ||
viewDef.defaults.duration ||
dynamicOptionOverrides.duration ||
optionOverrides.duration;
var duration = null;
var durationUnit = '';
var singleUnit = '';
var singleUnitOverrides = {};
if (durationInput) {
duration = createDurationCached(durationInput);
if (duration) { // valid?
var denom = greatestDurationDenominator(duration);
durationUnit = denom.unit;
if (denom.value === 1) {
singleUnit = durationUnit;
singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {};
}
}
}
var queryButtonText = function (optionsSubset) {
var buttonTextMap = optionsSubset.buttonText || {};
var buttonTextKey = viewDef.defaults.buttonTextKey;
if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) {
return buttonTextMap[buttonTextKey];
}
if (buttonTextMap[viewDef.type] != null) {
return buttonTextMap[viewDef.type];
}
if (buttonTextMap[singleUnit] != null) {
return buttonTextMap[singleUnit];
}
return null;
};
var queryButtonTitle = function (optionsSubset) {
var buttonHints = optionsSubset.buttonHints || {};
var buttonKey = viewDef.defaults.buttonTextKey; // use same key as text
if (buttonKey != null && buttonHints[buttonKey] != null) {
return buttonHints[buttonKey];
}
if (buttonHints[viewDef.type] != null) {
return buttonHints[viewDef.type];
}
if (buttonHints[singleUnit] != null) {
return buttonHints[singleUnit];
}
return null;
};
return {
type: viewDef.type,
component: viewDef.component,
duration: duration,
durationUnit: durationUnit,
singleUnit: singleUnit,
optionDefaults: viewDef.defaults,
optionOverrides: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, singleUnitOverrides), viewDef.overrides),
buttonTextOverride: queryButtonText(dynamicOptionOverrides) ||
queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence
viewDef.overrides.buttonText,
buttonTextDefault: queryButtonText(localeDefaults) ||
viewDef.defaults.buttonText ||
queryButtonText(BASE_OPTION_DEFAULTS) ||
viewDef.type,
// not DRY
buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) ||
queryButtonTitle(optionOverrides) ||
viewDef.overrides.buttonHint,
buttonTitleDefault: queryButtonTitle(localeDefaults) ||
viewDef.defaults.buttonHint ||
queryButtonTitle(BASE_OPTION_DEFAULTS),
// will eventually fall back to buttonText
};
}
// hack to get memoization working
var durationInputMap = {};
function createDurationCached(durationInput) {
var json = JSON.stringify(durationInput);
var res = durationInputMap[json];
if (res === undefined) {
res = createDuration(durationInput);
durationInputMap[json] = res;
}
return res;
}
var DateProfileGenerator = /** @class */ (function () {
function DateProfileGenerator(props) {
this.props = props;
this.nowDate = getNow(props.nowInput, props.dateEnv);
this.initHiddenDays();
}
/* Date Range Computation
------------------------------------------------------------------------------------------------------------------*/
// Builds a structure with info about what the dates/ranges will be for the "prev" view.
DateProfileGenerator.prototype.buildPrev = function (currentDateProfile, currentDate, forceToValid) {
var dateEnv = this.props.dateEnv;
var prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month
currentDateProfile.dateIncrement);
return this.build(prevDate, -1, forceToValid);
};
// Builds a structure with info about what the dates/ranges will be for the "next" view.
DateProfileGenerator.prototype.buildNext = function (currentDateProfile, currentDate, forceToValid) {
var dateEnv = this.props.dateEnv;
var nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month
currentDateProfile.dateIncrement);
return this.build(nextDate, 1, forceToValid);
};
// Builds a structure holding dates/ranges for rendering around the given date.
// Optional direction param indicates whether the date is being incremented/decremented
// from its previous value. decremented = -1, incremented = 1 (default).
DateProfileGenerator.prototype.build = function (currentDate, direction, forceToValid) {
if (forceToValid === void 0) { forceToValid = true; }
var props = this.props;
var validRange;
var currentInfo;
var isRangeAllDay;
var renderRange;
var activeRange;
var isValid;
validRange = this.buildValidRange();
validRange = this.trimHiddenDays(validRange);
if (forceToValid) {
currentDate = constrainMarkerToRange(currentDate, validRange);
}
currentInfo = this.buildCurrentRangeInfo(currentDate, direction);
isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit);
renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay);
renderRange = this.trimHiddenDays(renderRange);
activeRange = renderRange;
if (!props.showNonCurrentDates) {
activeRange = intersectRanges(activeRange, currentInfo.range);
}
activeRange = this.adjustActiveRange(activeRange);
activeRange = intersectRanges(activeRange, validRange); // might return null
// it's invalid if the originally requested date is not contained,
// or if the range is completely outside of the valid range.
isValid = rangesIntersect(currentInfo.range, validRange);
return {
// constraint for where prev/next operations can go and where events can be dragged/resized to.
// an object with optional start and end properties.
validRange: validRange,
// range the view is formally responsible for.
// for example, a month view might have 1st-31st, excluding padded dates
currentRange: currentInfo.range,
// name of largest unit being displayed, like "month" or "week"
currentRangeUnit: currentInfo.unit,
isRangeAllDay: isRangeAllDay,
// dates that display events and accept drag-n-drop
// will be `null` if no dates accept events
activeRange: activeRange,
// date range with a rendered skeleton
// includes not-active days that need some sort of DOM
renderRange: renderRange,
// Duration object that denotes the first visible time of any given day
slotMinTime: props.slotMinTime,
// Duration object that denotes the exclusive visible end time of any given day
slotMaxTime: props.slotMaxTime,
isValid: isValid,
// how far the current date will move for a prev/next operation
dateIncrement: this.buildDateIncrement(currentInfo.duration),
// pass a fallback (might be null) ^
};
};
// Builds an object with optional start/end properties.
// Indicates the minimum/maximum dates to display.
// not responsible for trimming hidden days.
DateProfileGenerator.prototype.buildValidRange = function () {
var input = this.props.validRangeInput;
var simpleInput = typeof input === 'function'
? input.call(this.props.calendarApi, this.nowDate)
: input;
return this.refineRange(simpleInput) ||
{ start: null, end: null }; // completely open-ended
};
// Builds a structure with info about the "current" range, the range that is
// highlighted as being the current month for example.
// See build() for a description of `direction`.
// Guaranteed to have `range` and `unit` properties. `duration` is optional.
DateProfileGenerator.prototype.buildCurrentRangeInfo = function (date, direction) {
var props = this.props;
var duration = null;
var unit = null;
var range = null;
var dayCount;
if (props.duration) {
duration = props.duration;
unit = props.durationUnit;
range = this.buildRangeFromDuration(date, direction, duration, unit);
}
else if ((dayCount = this.props.dayCount)) {
unit = 'day';
range = this.buildRangeFromDayCount(date, direction, dayCount);
}
else if ((range = this.buildCustomVisibleRange(date))) {
unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit;
}
else {
duration = this.getFallbackDuration();
unit = greatestDurationDenominator(duration).unit;
range = this.buildRangeFromDuration(date, direction, duration, unit);
}
return { duration: duration, unit: unit, range: range };
};
DateProfileGenerator.prototype.getFallbackDuration = function () {
return createDuration({ day: 1 });
};
// Returns a new activeRange to have time values (un-ambiguate)
// slotMinTime or slotMaxTime causes the range to expand.
DateProfileGenerator.prototype.adjustActiveRange = function (range) {
var _a = this.props, dateEnv = _a.dateEnv, usesMinMaxTime = _a.usesMinMaxTime, slotMinTime = _a.slotMinTime, slotMaxTime = _a.slotMaxTime;
var start = range.start, end = range.end;
if (usesMinMaxTime) {
// expand active range if slotMinTime is negative (why not when positive?)
if (asRoughDays(slotMinTime) < 0) {
start = startOfDay(start); // necessary?
start = dateEnv.add(start, slotMinTime);
}
// expand active range if slotMaxTime is beyond one day (why not when negative?)
if (asRoughDays(slotMaxTime) > 1) {
end = startOfDay(end); // necessary?
end = addDays(end, -1);
end = dateEnv.add(end, slotMaxTime);
}
}
return { start: start, end: end };
};
// Builds the "current" range when it is specified as an explicit duration.
// `unit` is the already-computed greatestDurationDenominator unit of duration.
DateProfileGenerator.prototype.buildRangeFromDuration = function (date, direction, duration, unit) {
var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment;
var start;
var end;
var res;
// compute what the alignment should be
if (!dateAlignment) {
var dateIncrement = this.props.dateIncrement;
if (dateIncrement) {
// use the smaller of the two units
if (asRoughMs(dateIncrement) < asRoughMs(duration)) {
dateAlignment = greatestDurationDenominator(dateIncrement).unit;
}
else {
dateAlignment = unit;
}
}
else {
dateAlignment = unit;
}
}
// if the view displays a single day or smaller
if (asRoughDays(duration) <= 1) {
if (this.isHiddenDay(start)) {
start = this.skipHiddenDays(start, direction);
start = startOfDay(start);
}
}
function computeRes() {
start = dateEnv.startOf(date, dateAlignment);
end = dateEnv.add(start, duration);
res = { start: start, end: end };
}
computeRes();
// if range is completely enveloped by hidden days, go past the hidden days
if (!this.trimHiddenDays(res)) {
date = this.skipHiddenDays(date, direction);
computeRes();
}
return res;
};
// Builds the "current" range when a dayCount is specified.
DateProfileGenerator.prototype.buildRangeFromDayCount = function (date, direction, dayCount) {
var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment;
var runningCount = 0;
var start = date;
var end;
if (dateAlignment) {
start = dateEnv.startOf(start, dateAlignment);
}
start = startOfDay(start);
start = this.skipHiddenDays(start, direction);
end = start;
do {
end = addDays(end, 1);
if (!this.isHiddenDay(end)) {
runningCount += 1;
}
} while (runningCount < dayCount);
return { start: start, end: end };
};
// Builds a normalized range object for the "visible" range,
// which is a way to define the currentRange and activeRange at the same time.
DateProfileGenerator.prototype.buildCustomVisibleRange = function (date) {
var props = this.props;
var input = props.visibleRangeInput;
var simpleInput = typeof input === 'function'
? input.call(props.calendarApi, props.dateEnv.toDate(date))
: input;
var range = this.refineRange(simpleInput);
if (range && (range.start == null || range.end == null)) {
return null;
}
return range;
};
// Computes the range that will represent the element/cells for *rendering*,
// but which may have voided days/times.
// not responsible for trimming hidden days.
DateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {
return currentRange;
};
// Compute the duration value that should be added/substracted to the current date
// when a prev/next operation happens.
DateProfileGenerator.prototype.buildDateIncrement = function (fallback) {
var dateIncrement = this.props.dateIncrement;
var customAlignment;
if (dateIncrement) {
return dateIncrement;
}
if ((customAlignment = this.props.dateAlignment)) {
return createDuration(1, customAlignment);
}
if (fallback) {
return fallback;
}
return createDuration({ days: 1 });
};
DateProfileGenerator.prototype.refineRange = function (rangeInput) {
if (rangeInput) {
var range = parseRange(rangeInput, this.props.dateEnv);
if (range) {
range = computeVisibleDayRange(range);
}
return range;
}
return null;
};
/* Hidden Days
------------------------------------------------------------------------------------------------------------------*/
// Initializes internal variables related to calculating hidden days-of-week
DateProfileGenerator.prototype.initHiddenDays = function () {
var hiddenDays = this.props.hiddenDays || []; // array of day-of-week indices that are hidden
var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)
var dayCnt = 0;
var i;
if (this.props.weekends === false) {
hiddenDays.push(0, 6); // 0=sunday, 6=saturday
}
for (i = 0; i < 7; i += 1) {
if (!(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)) {
dayCnt += 1;
}
}
if (!dayCnt) {
throw new Error('invalid hiddenDays'); // all days were hidden? bad.
}
this.isHiddenDayHash = isHiddenDayHash;
};
// Remove days from the beginning and end of the range that are computed as hidden.
// If the whole range is trimmed off, returns null
DateProfileGenerator.prototype.trimHiddenDays = function (range) {
var start = range.start, end = range.end;
if (start) {
start = this.skipHiddenDays(start);
}
if (end) {
end = this.skipHiddenDays(end, -1, true);
}
if (start == null || end == null || start < end) {
return { start: start, end: end };
}
return null;
};
// Is the current day hidden?
// `day` is a day-of-week index (0-6), or a Date (used for UTC)
DateProfileGenerator.prototype.isHiddenDay = function (day) {
if (day instanceof Date) {
day = day.getUTCDay();
}
return this.isHiddenDayHash[day];
};
// Incrementing the current day until it is no longer a hidden day, returning a copy.
// DOES NOT CONSIDER validRange!
// If the initial value of `date` is not a hidden day, don't do anything.
// Pass `isExclusive` as `true` if you are dealing with an end date.
// `inc` defaults to `1` (increment one day forward each time)
DateProfileGenerator.prototype.skipHiddenDays = function (date, inc, isExclusive) {
if (inc === void 0) { inc = 1; }
if (isExclusive === void 0) { isExclusive = false; }
while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) {
date = addDays(date, inc);
}
return date;
};
return DateProfileGenerator;
}());
function reduceViewType(viewType, action) {
switch (action.type) {
case 'CHANGE_VIEW_TYPE':
viewType = action.viewType;
}
return viewType;
}
function reduceDynamicOptionOverrides(dynamicOptionOverrides, action) {
var _a;
switch (action.type) {
case 'SET_OPTION':
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, dynamicOptionOverrides), (_a = {}, _a[action.optionName] = action.rawOptionValue, _a));
default:
return dynamicOptionOverrides;
}
}
function reduceDateProfile(currentDateProfile, action, currentDate, dateProfileGenerator) {
var dp;
switch (action.type) {
case 'CHANGE_VIEW_TYPE':
return dateProfileGenerator.build(action.dateMarker || currentDate);
case 'CHANGE_DATE':
return dateProfileGenerator.build(action.dateMarker);
case 'PREV':
dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate);
if (dp.isValid) {
return dp;
}
break;
case 'NEXT':
dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate);
if (dp.isValid) {
return dp;
}
break;
}
return currentDateProfile;
}
function initEventSources(calendarOptions, dateProfile, context) {
var activeRange = dateProfile ? dateProfile.activeRange : null;
return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context);
}
function reduceEventSources(eventSources, action, dateProfile, context) {
var activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
switch (action.type) {
case 'ADD_EVENT_SOURCES': // already parsed
return addSources(eventSources, action.sources, activeRange, context);
case 'REMOVE_EVENT_SOURCE':
return removeSource(eventSources, action.sourceId);
case 'PREV': // TODO: how do we track all actions that affect dateProfile :(
case 'NEXT':
case 'CHANGE_DATE':
case 'CHANGE_VIEW_TYPE':
if (dateProfile) {
return fetchDirtySources(eventSources, activeRange, context);
}
return eventSources;
case 'FETCH_EVENT_SOURCES':
return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?
arrayToHash(action.sourceIds) :
excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context);
case 'RECEIVE_EVENTS':
case 'RECEIVE_EVENT_ERROR':
return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);
case 'REMOVE_ALL_EVENT_SOURCES':
return {};
default:
return eventSources;
}
}
function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) {
var activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context);
}
function computeEventSourcesLoading(eventSources) {
for (var sourceId in eventSources) {
if (eventSources[sourceId].isFetching) {
return true;
}
}
return false;
}
function addSources(eventSourceHash, sources, fetchRange, context) {
var hash = {};
for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) {
var source = sources_1[_i];
hash[source.sourceId] = source;
}
if (fetchRange) {
hash = fetchDirtySources(hash, fetchRange, context);
}
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventSourceHash), hash);
}
function removeSource(eventSourceHash, sourceId) {
return filterHash(eventSourceHash, function (eventSource) { return eventSource.sourceId !== sourceId; });
}
function fetchDirtySources(sourceHash, fetchRange, context) {
return fetchSourcesByIds(sourceHash, filterHash(sourceHash, function (eventSource) { return isSourceDirty(eventSource, fetchRange, context); }), fetchRange, false, context);
}
function isSourceDirty(eventSource, fetchRange, context) {
if (!doesSourceNeedRange(eventSource, context)) {
return !eventSource.latestFetchId;
}
return !context.options.lazyFetching ||
!eventSource.fetchRange ||
eventSource.isFetching || // always cancel outdated in-progress fetches
fetchRange.start < eventSource.fetchRange.start ||
fetchRange.end > eventSource.fetchRange.end;
}
function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) {
var nextSources = {};
for (var sourceId in prevSources) {
var source = prevSources[sourceId];
if (sourceIdHash[sourceId]) {
nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context);
}
else {
nextSources[sourceId] = source;
}
}
return nextSources;
}
function fetchSource(eventSource, fetchRange, isRefetch, context) {
var options = context.options, calendarApi = context.calendarApi;
var sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];
var fetchId = guid();
sourceDef.fetch({
eventSource: eventSource,
range: fetchRange,
isRefetch: isRefetch,
context: context,
}, function (res) {
var rawEvents = res.rawEvents;
if (options.eventSourceSuccess) {
rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.xhr) || rawEvents;
}
if (eventSource.success) {
rawEvents = eventSource.success.call(calendarApi, rawEvents, res.xhr) || rawEvents;
}
context.dispatch({
type: 'RECEIVE_EVENTS',
sourceId: eventSource.sourceId,
fetchId: fetchId,
fetchRange: fetchRange,
rawEvents: rawEvents,
});
}, function (error) {
console.warn(error.message, error);
if (options.eventSourceFailure) {
options.eventSourceFailure.call(calendarApi, error);
}
if (eventSource.failure) {
eventSource.failure(error);
}
context.dispatch({
type: 'RECEIVE_EVENT_ERROR',
sourceId: eventSource.sourceId,
fetchId: fetchId,
fetchRange: fetchRange,
error: error,
});
});
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventSource), { isFetching: true, latestFetchId: fetchId });
}
function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {
var _a;
var eventSource = sourceHash[sourceId];
if (eventSource && // not already removed
fetchId === eventSource.latestFetchId) {
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, sourceHash), (_a = {}, _a[sourceId] = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventSource), { isFetching: false, fetchRange: fetchRange }), _a));
}
return sourceHash;
}
function excludeStaticSources(eventSources, context) {
return filterHash(eventSources, function (eventSource) { return doesSourceNeedRange(eventSource, context); });
}
function parseInitialSources(rawOptions, context) {
var refiners = buildEventSourceRefiners(context);
var rawSources = [].concat(rawOptions.eventSources || []);
var sources = []; // parsed
if (rawOptions.initialEvents) {
rawSources.unshift(rawOptions.initialEvents);
}
if (rawOptions.events) {
rawSources.unshift(rawOptions.events);
}
for (var _i = 0, rawSources_1 = rawSources; _i < rawSources_1.length; _i++) {
var rawSource = rawSources_1[_i];
var source = parseEventSource(rawSource, context, refiners);
if (source) {
sources.push(source);
}
}
return sources;
}
function doesSourceNeedRange(eventSource, context) {
var defs = context.pluginHooks.eventSourceDefs;
return !defs[eventSource.sourceDefId].ignoreRange;
}
function reduceEventStore(eventStore, action, eventSources, dateProfile, context) {
switch (action.type) {
case 'RECEIVE_EVENTS': // raw
return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context);
case 'ADD_EVENTS': // already parsed, but not expanded
return addEvent(eventStore, action.eventStore, // new ones
dateProfile ? dateProfile.activeRange : null, context);
case 'RESET_EVENTS':
return action.eventStore;
case 'MERGE_EVENTS': // already parsed and expanded
return mergeEventStores(eventStore, action.eventStore);
case 'PREV': // TODO: how do we track all actions that affect dateProfile :(
case 'NEXT':
case 'CHANGE_DATE':
case 'CHANGE_VIEW_TYPE':
if (dateProfile) {
return expandRecurring(eventStore, dateProfile.activeRange, context);
}
return eventStore;
case 'REMOVE_EVENTS':
return excludeSubEventStore(eventStore, action.eventStore);
case 'REMOVE_EVENT_SOURCE':
return excludeEventsBySourceId(eventStore, action.sourceId);
case 'REMOVE_ALL_EVENT_SOURCES':
return filterEventStoreDefs(eventStore, function (eventDef) { return (!eventDef.sourceId // only keep events with no source id
); });
case 'REMOVE_ALL_EVENTS':
return createEmptyEventStore();
default:
return eventStore;
}
}
function receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, context) {
if (eventSource && // not already removed
fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources
) {
var subset = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context);
if (fetchRange) {
subset = expandRecurring(subset, fetchRange, context);
}
return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset);
}
return eventStore;
}
function transformRawEvents(rawEvents, eventSource, context) {
var calEachTransform = context.options.eventDataTransform;
var sourceEachTransform = eventSource ? eventSource.eventDataTransform : null;
if (sourceEachTransform) {
rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform);
}
if (calEachTransform) {
rawEvents = transformEachRawEvent(rawEvents, calEachTransform);
}
return rawEvents;
}
function transformEachRawEvent(rawEvents, func) {
var refinedEvents;
if (!func) {
refinedEvents = rawEvents;
}
else {
refinedEvents = [];
for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) {
var rawEvent = rawEvents_1[_i];
var refinedEvent = func(rawEvent);
if (refinedEvent) {
refinedEvents.push(refinedEvent);
}
else if (refinedEvent == null) {
refinedEvents.push(rawEvent);
} // if a different falsy value, do nothing
}
}
return refinedEvents;
}
function addEvent(eventStore, subset, expandRange, context) {
if (expandRange) {
subset = expandRecurring(subset, expandRange, context);
}
return mergeEventStores(eventStore, subset);
}
function rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) {
var defs = eventStore.defs;
var instances = mapHash(eventStore.instances, function (instance) {
var def = defs[instance.defId];
if (def.allDay || def.recurringDef) {
return instance; // isn't dependent on timezone
}
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, instance), { range: {
start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)),
end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo)),
}, forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo, forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo });
});
return { defs: defs, instances: instances };
}
function excludeEventsBySourceId(eventStore, sourceId) {
return filterEventStoreDefs(eventStore, function (eventDef) { return eventDef.sourceId !== sourceId; });
}
// QUESTION: why not just return instances? do a general object-property-exclusion util
function excludeInstances(eventStore, removals) {
return {
defs: eventStore.defs,
instances: filterHash(eventStore.instances, function (instance) { return !removals[instance.instanceId]; }),
};
}
function reduceDateSelection(currentSelection, action) {
switch (action.type) {
case 'UNSELECT_DATES':
return null;
case 'SELECT_DATES':
return action.selection;
default:
return currentSelection;
}
}
function reduceSelectedEvent(currentInstanceId, action) {
switch (action.type) {
case 'UNSELECT_EVENT':
return '';
case 'SELECT_EVENT':
return action.eventInstanceId;
default:
return currentInstanceId;
}
}
function reduceEventDrag(currentDrag, action) {
var newDrag;
switch (action.type) {
case 'UNSET_EVENT_DRAG':
return null;
case 'SET_EVENT_DRAG':
newDrag = action.state;
return {
affectedEvents: newDrag.affectedEvents,
mutatedEvents: newDrag.mutatedEvents,
isEvent: newDrag.isEvent,
};
default:
return currentDrag;
}
}
function reduceEventResize(currentResize, action) {
var newResize;
switch (action.type) {
case 'UNSET_EVENT_RESIZE':
return null;
case 'SET_EVENT_RESIZE':
newResize = action.state;
return {
affectedEvents: newResize.affectedEvents,
mutatedEvents: newResize.mutatedEvents,
isEvent: newResize.isEvent,
};
default:
return currentResize;
}
}
function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
var header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null;
var footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null;
return { header: header, footer: footer };
}
function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {
var sectionWidgets = {};
var viewsWithButtons = [];
var hasTitle = false;
for (var sectionName in sectionStrHash) {
var sectionStr = sectionStrHash[sectionName];
var sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi);
sectionWidgets[sectionName] = sectionRes.widgets;
viewsWithButtons.push.apply(viewsWithButtons, sectionRes.viewsWithButtons);
hasTitle = hasTitle || sectionRes.hasTitle;
}
return { sectionWidgets: sectionWidgets, viewsWithButtons: viewsWithButtons, hasTitle: hasTitle };
}
/*
BAD: querying icons and text here. should be done at render time
*/
function parseSection(sectionStr, calendarOptions, // defaults+overrides, then refined
calendarOptionOverrides, // overrides only!, unrefined :(
theme, viewSpecs, calendarApi) {
var isRtl = calendarOptions.direction === 'rtl';
var calendarCustomButtons = calendarOptions.customButtons || {};
var calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {};
var calendarButtonText = calendarOptions.buttonText || {};
var calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {};
var calendarButtonHints = calendarOptions.buttonHints || {};
var sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];
var viewsWithButtons = [];
var hasTitle = false;
var widgets = sectionSubstrs.map(function (buttonGroupStr) { return (buttonGroupStr.split(',').map(function (buttonName) {
if (buttonName === 'title') {
hasTitle = true;
return { buttonName: buttonName };
}
var customButtonProps;
var viewSpec;
var buttonClick;
var buttonIcon; // only one of these will be set
var buttonText; // "
var buttonHint;
// ^ for the title="" attribute, for accessibility
if ((customButtonProps = calendarCustomButtons[buttonName])) {
buttonClick = function (ev) {
if (customButtonProps.click) {
customButtonProps.click.call(ev.target, ev, ev.target); // TODO: use Calendar this context?
}
};
(buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
(buttonText = customButtonProps.text);
buttonHint = customButtonProps.hint || customButtonProps.text;
}
else if ((viewSpec = viewSpecs[buttonName])) {
viewsWithButtons.push(buttonName);
buttonClick = function () {
calendarApi.changeView(buttonName);
};
(buttonText = viewSpec.buttonTextOverride) ||
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
(buttonText = viewSpec.buttonTextDefault);
var textFallback = viewSpec.buttonTextOverride ||
viewSpec.buttonTextDefault;
buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride ||
viewSpec.buttonTitleDefault ||
calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName
textFallback);
}
else if (calendarApi[buttonName]) { // a calendarApi method
buttonClick = function () {
calendarApi[buttonName]();
};
(buttonText = calendarButtonTextOverrides[buttonName]) ||
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
(buttonText = calendarButtonText[buttonName]); // everything else is considered default
if (buttonName === 'prevYear' || buttonName === 'nextYear') {
var prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next';
buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] ||
calendarButtonHints[prevOrNext], [
calendarButtonText.year || 'year',
'year',
], calendarButtonText[buttonName]);
}
else {
buttonHint = function (navUnit) { return formatWithOrdinals(calendarButtonHintOverrides[buttonName] ||
calendarButtonHints[buttonName], [
calendarButtonText[navUnit] || navUnit,
navUnit,
], calendarButtonText[buttonName]); };
}
}
return { buttonName: buttonName, buttonClick: buttonClick, buttonIcon: buttonIcon, buttonText: buttonText, buttonHint: buttonHint };
})); });
return { widgets: widgets, viewsWithButtons: viewsWithButtons, hasTitle: hasTitle };
}
var eventSourceDef$2 = {
ignoreRange: true,
parseMeta: function (refined) {
if (Array.isArray(refined.events)) {
return refined.events;
}
return null;
},
fetch: function (arg, success) {
success({
rawEvents: arg.eventSource.meta,
});
},
};
var arrayEventSourcePlugin = createPlugin({
eventSourceDefs: [eventSourceDef$2],
});
var eventSourceDef$1 = {
parseMeta: function (refined) {
if (typeof refined.events === 'function') {
return refined.events;
}
return null;
},
fetch: function (arg, success, failure) {
var dateEnv = arg.context.dateEnv;
var func = arg.eventSource.meta;
unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), function (rawEvents) {
success({ rawEvents: rawEvents }); // needs an object response
}, failure);
},
};
var funcEventSourcePlugin = createPlugin({
eventSourceDefs: [eventSourceDef$1],
});
function requestJson(method, url, params, successCallback, failureCallback) {
method = method.toUpperCase();
var body = null;
if (method === 'GET') {
url = injectQueryStringParams(url, params);
}
else {
body = encodeParams(params);
}
var xhr = new XMLHttpRequest();
xhr.open(method, url, true);
if (method !== 'GET') {
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
}
xhr.onload = function () {
if (xhr.status >= 200 && xhr.status < 400) {
var parsed = false;
var res = void 0;
try {
res = JSON.parse(xhr.responseText);
parsed = true;
}
catch (err) {
// will handle parsed=false
}
if (parsed) {
successCallback(res, xhr);
}
else {
failureCallback('Failure parsing JSON', xhr);
}
}
else {
failureCallback('Request failed', xhr);
}
};
xhr.onerror = function () {
failureCallback('Request failed', xhr);
};
xhr.send(body);
}
function injectQueryStringParams(url, params) {
return url +
(url.indexOf('?') === -1 ? '?' : '&') +
encodeParams(params);
}
function encodeParams(params) {
var parts = [];
for (var key in params) {
parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(params[key]));
}
return parts.join('&');
}
var JSON_FEED_EVENT_SOURCE_REFINERS = {
method: String,
extraParams: identity,
startParam: String,
endParam: String,
timeZoneParam: String,
};
var eventSourceDef = {
parseMeta: function (refined) {
if (refined.url && (refined.format === 'json' || !refined.format)) {
return {
url: refined.url,
format: 'json',
method: (refined.method || 'GET').toUpperCase(),
extraParams: refined.extraParams,
startParam: refined.startParam,
endParam: refined.endParam,
timeZoneParam: refined.timeZoneParam,
};
}
return null;
},
fetch: function (arg, success, failure) {
var meta = arg.eventSource.meta;
var requestParams = buildRequestParams(meta, arg.range, arg.context);
requestJson(meta.method, meta.url, requestParams, function (rawEvents, xhr) {
success({ rawEvents: rawEvents, xhr: xhr });
}, function (errorMessage, xhr) {
failure({ message: errorMessage, xhr: xhr });
});
},
};
var jsonFeedEventSourcePlugin = createPlugin({
eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,
eventSourceDefs: [eventSourceDef],
});
function buildRequestParams(meta, range, context) {
var dateEnv = context.dateEnv, options = context.options;
var startParam;
var endParam;
var timeZoneParam;
var customRequestParams;
var params = {};
startParam = meta.startParam;
if (startParam == null) {
startParam = options.startParam;
}
endParam = meta.endParam;
if (endParam == null) {
endParam = options.endParam;
}
timeZoneParam = meta.timeZoneParam;
if (timeZoneParam == null) {
timeZoneParam = options.timeZoneParam;
}
// retrieve any outbound GET/POST data from the options
if (typeof meta.extraParams === 'function') {
// supplied as a function that returns a key/value object
customRequestParams = meta.extraParams();
}
else {
// probably supplied as a straight key/value object
customRequestParams = meta.extraParams || {};
}
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(params, customRequestParams);
params[startParam] = dateEnv.formatIso(range.start);
params[endParam] = dateEnv.formatIso(range.end);
if (dateEnv.timeZone !== 'local') {
params[timeZoneParam] = dateEnv.timeZone;
}
return params;
}
var SIMPLE_RECURRING_REFINERS = {
daysOfWeek: identity,
startTime: createDuration,
endTime: createDuration,
duration: createDuration,
startRecur: identity,
endRecur: identity,
};
var recurring = {
parse: function (refined, dateEnv) {
if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {
var recurringData = {
daysOfWeek: refined.daysOfWeek || null,
startTime: refined.startTime || null,
endTime: refined.endTime || null,
startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,
endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,
};
var duration = void 0;
if (refined.duration) {
duration = refined.duration;
}
if (!duration && refined.startTime && refined.endTime) {
duration = subtractDurations(refined.endTime, refined.startTime);
}
return {
allDayGuess: Boolean(!refined.startTime && !refined.endTime),
duration: duration,
typeData: recurringData, // doesn't need endTime anymore but oh well
};
}
return null;
},
expand: function (typeData, framingRange, dateEnv) {
var clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });
if (clippedFramingRange) {
return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);
}
return [];
},
};
var simpleRecurringEventsPlugin = createPlugin({
recurringTypes: [recurring],
eventRefiners: SIMPLE_RECURRING_REFINERS,
});
function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
var dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;
var dayMarker = startOfDay(framingRange.start);
var endMarker = framingRange.end;
var instanceStarts = [];
while (dayMarker < endMarker) {
var instanceStart
// if everyday, or this particular day-of-week
= void 0;
// if everyday, or this particular day-of-week
if (!dowHash || dowHash[dayMarker.getUTCDay()]) {
if (startTime) {
instanceStart = dateEnv.add(dayMarker, startTime);
}
else {
instanceStart = dayMarker;
}
instanceStarts.push(instanceStart);
}
dayMarker = addDays(dayMarker, 1);
}
return instanceStarts;
}
var changeHandlerPlugin = createPlugin({
optionChangeHandlers: {
events: function (events, context) {
handleEventSources([events], context);
},
eventSources: handleEventSources,
},
});
/*
BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out
*/
function handleEventSources(inputs, context) {
var unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);
var newInputs = [];
for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {
var input = inputs_1[_i];
var inputFound = false;
for (var i = 0; i < unfoundSources.length; i += 1) {
if (unfoundSources[i]._raw === input) {
unfoundSources.splice(i, 1); // delete
inputFound = true;
break;
}
}
if (!inputFound) {
newInputs.push(input);
}
}
for (var _a = 0, unfoundSources_1 = unfoundSources; _a < unfoundSources_1.length; _a++) {
var unfoundSource = unfoundSources_1[_a];
context.dispatch({
type: 'REMOVE_EVENT_SOURCE',
sourceId: unfoundSource.sourceId,
});
}
for (var _b = 0, newInputs_1 = newInputs; _b < newInputs_1.length; _b++) {
var newInput = newInputs_1[_b];
context.calendarApi.addEventSource(newInput);
}
}
function handleDateProfile(dateProfile, context) {
context.emitter.trigger('datesSet', (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
}
function handleEventStore(eventStore, context) {
var emitter = context.emitter;
if (emitter.hasHandlers('eventsSet')) {
emitter.trigger('eventsSet', buildEventApis(eventStore, context));
}
}
/*
this array is exposed on the root namespace so that UMD plugins can add to it.
see the rollup-bundles script.
*/
var globalPlugins = [
arrayEventSourcePlugin,
funcEventSourcePlugin,
jsonFeedEventSourcePlugin,
simpleRecurringEventsPlugin,
changeHandlerPlugin,
createPlugin({
isLoadingFuncs: [
function (state) { return computeEventSourcesLoading(state.eventSources); },
],
contentTypeHandlers: {
html: buildHtmlRenderer,
domNodes: buildDomNodeRenderer,
},
propSetHandlers: {
dateProfile: handleDateProfile,
eventStore: handleEventStore,
},
}),
];
function buildHtmlRenderer() {
var currentEl = null;
var currentHtml = '';
function render(el, html) {
if (el !== currentEl || html !== currentHtml) {
el.innerHTML = html;
}
currentEl = el;
currentHtml = html;
}
function destroy() {
currentEl.innerHTML = '';
currentEl = null;
currentHtml = '';
}
return { render: render, destroy: destroy };
}
function buildDomNodeRenderer() {
var currentEl = null;
var currentDomNodes = [];
function render(el, domNodes) {
var newDomNodes = Array.prototype.slice.call(domNodes);
if (el !== currentEl || !isArraysEqual(currentDomNodes, newDomNodes)) {
// append first, remove second (for scroll resetting)
for (var _i = 0, newDomNodes_1 = newDomNodes; _i < newDomNodes_1.length; _i++) {
var newNode = newDomNodes_1[_i];
el.appendChild(newNode);
}
destroy();
}
currentEl = el;
currentDomNodes = newDomNodes;
}
function destroy() {
currentDomNodes.forEach(removeElement);
currentDomNodes = [];
currentEl = null;
}
return { render: render, destroy: destroy };
}
var DelayedRunner = /** @class */ (function () {
function DelayedRunner(drainedOption) {
this.drainedOption = drainedOption;
this.isRunning = false;
this.isDirty = false;
this.pauseDepths = {};
this.timeoutId = 0;
}
DelayedRunner.prototype.request = function (delay) {
this.isDirty = true;
if (!this.isPaused()) {
this.clearTimeout();
if (delay == null) {
this.tryDrain();
}
else {
this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce
this.tryDrain.bind(this), delay);
}
}
};
DelayedRunner.prototype.pause = function (scope) {
if (scope === void 0) { scope = ''; }
var pauseDepths = this.pauseDepths;
pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;
this.clearTimeout();
};
DelayedRunner.prototype.resume = function (scope, force) {
if (scope === void 0) { scope = ''; }
var pauseDepths = this.pauseDepths;
if (scope in pauseDepths) {
if (force) {
delete pauseDepths[scope];
}
else {
pauseDepths[scope] -= 1;
var depth = pauseDepths[scope];
if (depth <= 0) {
delete pauseDepths[scope];
}
}
this.tryDrain();
}
};
DelayedRunner.prototype.isPaused = function () {
return Object.keys(this.pauseDepths).length;
};
DelayedRunner.prototype.tryDrain = function () {
if (!this.isRunning && !this.isPaused()) {
this.isRunning = true;
while (this.isDirty) {
this.isDirty = false;
this.drained(); // might set isDirty to true again
}
this.isRunning = false;
}
};
DelayedRunner.prototype.clear = function () {
this.clearTimeout();
this.isDirty = false;
this.pauseDepths = {};
};
DelayedRunner.prototype.clearTimeout = function () {
if (this.timeoutId) {
clearTimeout(this.timeoutId);
this.timeoutId = 0;
}
};
DelayedRunner.prototype.drained = function () {
if (this.drainedOption) {
this.drainedOption();
}
};
return DelayedRunner;
}());
var TaskRunner = /** @class */ (function () {
function TaskRunner(runTaskOption, drainedOption) {
this.runTaskOption = runTaskOption;
this.drainedOption = drainedOption;
this.queue = [];
this.delayedRunner = new DelayedRunner(this.drain.bind(this));
}
TaskRunner.prototype.request = function (task, delay) {
this.queue.push(task);
this.delayedRunner.request(delay);
};
TaskRunner.prototype.pause = function (scope) {
this.delayedRunner.pause(scope);
};
TaskRunner.prototype.resume = function (scope, force) {
this.delayedRunner.resume(scope, force);
};
TaskRunner.prototype.drain = function () {
var queue = this.queue;
while (queue.length) {
var completedTasks = [];
var task = void 0;
while ((task = queue.shift())) {
this.runTask(task);
completedTasks.push(task);
}
this.drained(completedTasks);
} // keep going, in case new tasks were added in the drained handler
};
TaskRunner.prototype.runTask = function (task) {
if (this.runTaskOption) {
this.runTaskOption(task);
}
};
TaskRunner.prototype.drained = function (completedTasks) {
if (this.drainedOption) {
this.drainedOption(completedTasks);
}
};
return TaskRunner;
}());
// Computes what the title at the top of the calendarApi should be for this view
function buildTitle(dateProfile, viewOptions, dateEnv) {
var range;
// for views that span a large unit of time, show the proper interval, ignoring stray days before and after
if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {
range = dateProfile.currentRange;
}
else { // for day units or smaller, use the actual day range
range = dateProfile.activeRange;
}
return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {
isEndExclusive: dateProfile.isRangeAllDay,
defaultSeparator: viewOptions.titleRangeSeparator,
});
}
// Generates the format string that should be used to generate the title for the current date range.
// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
function buildTitleFormat(dateProfile) {
var currentRangeUnit = dateProfile.currentRangeUnit;
if (currentRangeUnit === 'year') {
return { year: 'numeric' };
}
if (currentRangeUnit === 'month') {
return { year: 'numeric', month: 'long' }; // like "September 2014"
}
var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
if (days !== null && days > 1) {
// multi-day range. shorter, like "Sep 9 - 10 2014"
return { year: 'numeric', month: 'short', day: 'numeric' };
}
// one day. longer, like "September 9 2014"
return { year: 'numeric', month: 'long', day: 'numeric' };
}
// in future refactor, do the redux-style function(state=initial) for initial-state
// also, whatever is happening in constructor, have it happen in action queue too
var CalendarDataManager = /** @class */ (function () {
function CalendarDataManager(props) {
var _this = this;
this.computeOptionsData = memoize(this._computeOptionsData);
this.computeCurrentViewData = memoize(this._computeCurrentViewData);
this.organizeRawLocales = memoize(organizeRawLocales);
this.buildLocale = memoize(buildLocale);
this.buildPluginHooks = buildBuildPluginHooks();
this.buildDateEnv = memoize(buildDateEnv);
this.buildTheme = memoize(buildTheme);
this.parseToolbars = memoize(parseToolbars);
this.buildViewSpecs = memoize(buildViewSpecs);
this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
this.buildViewApi = memoize(buildViewApi);
this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);
this.buildEventUiBases = memoize(buildEventUiBases);
this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
this.buildTitle = memoize(buildTitle);
this.emitter = new Emitter();
this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this));
this.currentCalendarOptionsInput = {};
this.currentCalendarOptionsRefined = {};
this.currentViewOptionsInput = {};
this.currentViewOptionsRefined = {};
this.currentCalendarOptionsRefiners = {};
this.getCurrentData = function () { return _this.data; };
this.dispatch = function (action) {
_this.actionRunner.request(action); // protects against recursive calls to _handleAction
};
this.props = props;
this.actionRunner.pause();
var dynamicOptionOverrides = {};
var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);
var currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView;
var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);
// wire things up
// TODO: not DRY
props.calendarApi.currentDataManager = this;
this.emitter.setThisContext(props.calendarApi);
this.emitter.setOptions(currentViewData.options);
var currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
var dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
currentDate = dateProfile.currentRange.start;
}
var calendarContext = {
dateEnv: optionsData.dateEnv,
options: optionsData.calendarOptions,
pluginHooks: optionsData.pluginHooks,
calendarApi: props.calendarApi,
dispatch: this.dispatch,
emitter: this.emitter,
getCurrentData: this.getCurrentData,
};
// needs to be after setThisContext
for (var _i = 0, _a = optionsData.pluginHooks.contextInit; _i < _a.length; _i++) {
var callback = _a[_i];
callback(calendarContext);
}
// NOT DRY
var eventSources = initEventSources(optionsData.calendarOptions, dateProfile, calendarContext);
var initialState = {
dynamicOptionOverrides: dynamicOptionOverrides,
currentViewType: currentViewType,
currentDate: currentDate,
dateProfile: dateProfile,
businessHours: this.parseContextBusinessHours(calendarContext),
eventSources: eventSources,
eventUiBases: {},
eventStore: createEmptyEventStore(),
renderableEventStore: createEmptyEventStore(),
dateSelection: null,
eventSelection: '',
eventDrag: null,
eventResize: null,
selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig,
};
var contextAndState = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, calendarContext), initialState);
for (var _b = 0, _c = optionsData.pluginHooks.reducers; _b < _c.length; _b++) {
var reducer = _c[_b];
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(initialState, reducer(null, null, contextAndState));
}
if (computeIsLoading(initialState, calendarContext)) {
this.emitter.trigger('loading', true); // NOT DRY
}
this.state = initialState;
this.updateData();
this.actionRunner.resume();
}
CalendarDataManager.prototype.resetOptions = function (optionOverrides, append) {
var props = this.props;
props.optionOverrides = append
? (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, props.optionOverrides), optionOverrides) : optionOverrides;
this.actionRunner.request({
type: 'NOTHING',
});
};
CalendarDataManager.prototype._handleAction = function (action) {
var _a = this, props = _a.props, state = _a.state, emitter = _a.emitter;
var dynamicOptionOverrides = reduceDynamicOptionOverrides(state.dynamicOptionOverrides, action);
var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);
var currentViewType = reduceViewType(state.currentViewType, action);
var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);
// wire things up
// TODO: not DRY
props.calendarApi.currentDataManager = this;
emitter.setThisContext(props.calendarApi);
emitter.setOptions(currentViewData.options);
var calendarContext = {
dateEnv: optionsData.dateEnv,
options: optionsData.calendarOptions,
pluginHooks: optionsData.pluginHooks,
calendarApi: props.calendarApi,
dispatch: this.dispatch,
emitter: emitter,
getCurrentData: this.getCurrentData,
};
var currentDate = state.currentDate, dateProfile = state.dateProfile;
if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack
dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
}
currentDate = reduceCurrentDate(currentDate, action);
dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator);
if (action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator
action.type === 'NEXT' || // "
!rangeContainsMarker(dateProfile.currentRange, currentDate)) {
currentDate = dateProfile.currentRange.start;
}
var eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext);
var eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext);
var isEventsLoading = computeEventSourcesLoading(eventSources); // BAD. also called in this func in computeIsLoading
var renderableEventStore = (isEventsLoading && !currentViewData.options.progressiveEventRendering) ?
(state.renderableEventStore || eventStore) : // try from previous state
eventStore;
var _b = this.buildViewUiProps(calendarContext), eventUiSingleBase = _b.eventUiSingleBase, selectionConfig = _b.selectionConfig; // will memoize obj
var eventUiBySource = this.buildEventUiBySource(eventSources);
var eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource);
var newState = {
dynamicOptionOverrides: dynamicOptionOverrides,
currentViewType: currentViewType,
currentDate: currentDate,
dateProfile: dateProfile,
eventSources: eventSources,
eventStore: eventStore,
renderableEventStore: renderableEventStore,
selectionConfig: selectionConfig,
eventUiBases: eventUiBases,
businessHours: this.parseContextBusinessHours(calendarContext),
dateSelection: reduceDateSelection(state.dateSelection, action),
eventSelection: reduceSelectedEvent(state.eventSelection, action),
eventDrag: reduceEventDrag(state.eventDrag, action),
eventResize: reduceEventResize(state.eventResize, action),
};
var contextAndState = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, calendarContext), newState);
for (var _i = 0, _c = optionsData.pluginHooks.reducers; _i < _c.length; _i++) {
var reducer = _c[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(newState, reducer(state, action, contextAndState)); // give the OLD state, for old value
}
var wasLoading = computeIsLoading(state, calendarContext);
var isLoading = computeIsLoading(newState, calendarContext);
// TODO: use propSetHandlers in plugin system
if (!wasLoading && isLoading) {
emitter.trigger('loading', true);
}
else if (wasLoading && !isLoading) {
emitter.trigger('loading', false);
}
this.state = newState;
if (props.onAction) {
props.onAction(action);
}
};
CalendarDataManager.prototype.updateData = function () {
var _a = this, props = _a.props, state = _a.state;
var oldData = this.data;
var optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi);
var currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides);
var data = this.data = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);
var changeHandlers = optionsData.pluginHooks.optionChangeHandlers;
var oldCalendarOptions = oldData && oldData.calendarOptions;
var newCalendarOptions = optionsData.calendarOptions;
if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) {
if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) {
// hack
state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data);
state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv);
}
for (var optionName in changeHandlers) {
if (oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) {
changeHandlers[optionName](newCalendarOptions[optionName], data);
}
}
}
if (props.onData) {
props.onData(data);
}
};
CalendarDataManager.prototype._computeOptionsData = function (optionOverrides, dynamicOptionOverrides, calendarApi) {
// TODO: blacklist options that are handled by optionChangeHandlers
var _a = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, pluginHooks = _a.pluginHooks, localeDefaults = _a.localeDefaults, availableLocaleData = _a.availableLocaleData, extra = _a.extra;
warnUnknownOptions(extra);
var dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
var viewSpecs = this.buildViewSpecs(pluginHooks.views, optionOverrides, dynamicOptionOverrides, localeDefaults);
var theme = this.buildTheme(refinedOptions, pluginHooks);
var toolbarConfig = this.parseToolbars(refinedOptions, optionOverrides, theme, viewSpecs, calendarApi);
return {
calendarOptions: refinedOptions,
pluginHooks: pluginHooks,
dateEnv: dateEnv,
viewSpecs: viewSpecs,
theme: theme,
toolbarConfig: toolbarConfig,
localeDefaults: localeDefaults,
availableRawLocales: availableLocaleData.map,
};
};
// always called from behind a memoizer
CalendarDataManager.prototype.processRawCalendarOptions = function (optionOverrides, dynamicOptionOverrides) {
var _a = mergeRawOptions([
BASE_OPTION_DEFAULTS,
optionOverrides,
dynamicOptionOverrides,
]), locales = _a.locales, locale = _a.locale;
var availableLocaleData = this.organizeRawLocales(locales);
var availableRawLocales = availableLocaleData.map;
var localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
var pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
var refiners = this.currentCalendarOptionsRefiners = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
var extra = {};
var raw = mergeRawOptions([
BASE_OPTION_DEFAULTS,
localeDefaults,
optionOverrides,
dynamicOptionOverrides,
]);
var refined = {};
var currentRaw = this.currentCalendarOptionsInput;
var currentRefined = this.currentCalendarOptionsRefined;
var anyChanges = false;
for (var optionName in raw) {
if (optionName !== 'plugins') { // because plugins is special-cased
if (raw[optionName] === currentRaw[optionName] ||
(COMPLEX_OPTION_COMPARATORS[optionName] &&
(optionName in currentRaw) &&
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName]))) {
refined[optionName] = currentRefined[optionName];
}
else if (refiners[optionName]) {
refined[optionName] = refiners[optionName](raw[optionName]);
anyChanges = true;
}
else {
extra[optionName] = currentRaw[optionName];
}
}
}
if (anyChanges) {
this.currentCalendarOptionsInput = raw;
this.currentCalendarOptionsRefined = refined;
}
return {
rawOptions: this.currentCalendarOptionsInput,
refinedOptions: this.currentCalendarOptionsRefined,
pluginHooks: pluginHooks,
availableLocaleData: availableLocaleData,
localeDefaults: localeDefaults,
extra: extra,
};
};
CalendarDataManager.prototype._computeCurrentViewData = function (viewType, optionsData, optionOverrides, dynamicOptionOverrides) {
var viewSpec = optionsData.viewSpecs[viewType];
if (!viewSpec) {
throw new Error("viewType \"" + viewType + "\" is not available. Please make sure you've loaded all neccessary plugins");
}
var _a = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, extra = _a.extra;
warnUnknownOptions(extra);
var dateProfileGenerator = this.buildDateProfileGenerator({
dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,
duration: viewSpec.duration,
durationUnit: viewSpec.durationUnit,
usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime,
dateEnv: optionsData.dateEnv,
calendarApi: this.props.calendarApi,
slotMinTime: refinedOptions.slotMinTime,
slotMaxTime: refinedOptions.slotMaxTime,
showNonCurrentDates: refinedOptions.showNonCurrentDates,
dayCount: refinedOptions.dayCount,
dateAlignment: refinedOptions.dateAlignment,
dateIncrement: refinedOptions.dateIncrement,
hiddenDays: refinedOptions.hiddenDays,
weekends: refinedOptions.weekends,
nowInput: refinedOptions.now,
validRangeInput: refinedOptions.validRange,
visibleRangeInput: refinedOptions.visibleRange,
monthMode: refinedOptions.monthMode,
fixedWeekCount: refinedOptions.fixedWeekCount,
});
var viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv);
return { viewSpec: viewSpec, options: refinedOptions, dateProfileGenerator: dateProfileGenerator, viewApi: viewApi };
};
CalendarDataManager.prototype.processRawViewOptions = function (viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
var raw = mergeRawOptions([
BASE_OPTION_DEFAULTS,
viewSpec.optionDefaults,
localeDefaults,
optionOverrides,
viewSpec.optionOverrides,
dynamicOptionOverrides,
]);
var refiners = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
var refined = {};
var currentRaw = this.currentViewOptionsInput;
var currentRefined = this.currentViewOptionsRefined;
var anyChanges = false;
var extra = {};
for (var optionName in raw) {
if (raw[optionName] === currentRaw[optionName]) {
refined[optionName] = currentRefined[optionName];
}
else {
if (raw[optionName] === this.currentCalendarOptionsInput[optionName]) {
if (optionName in this.currentCalendarOptionsRefined) { // might be an "extra" prop
refined[optionName] = this.currentCalendarOptionsRefined[optionName];
}
}
else if (refiners[optionName]) {
refined[optionName] = refiners[optionName](raw[optionName]);
}
else {
extra[optionName] = raw[optionName];
}
anyChanges = true;
}
}
if (anyChanges) {
this.currentViewOptionsInput = raw;
this.currentViewOptionsRefined = refined;
}
return {
rawOptions: this.currentViewOptionsInput,
refinedOptions: this.currentViewOptionsRefined,
extra: extra,
};
};
return CalendarDataManager;
}());
function buildDateEnv(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
var locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
return new DateEnv({
calendarSystem: 'gregory',
timeZone: timeZone,
namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl,
locale: locale,
weekNumberCalculation: weekNumberCalculation,
firstDay: firstDay,
weekText: weekText,
cmdFormatter: pluginHooks.cmdFormatter,
defaultSeparator: defaultSeparator,
});
}
function buildTheme(options, pluginHooks) {
var ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme;
return new ThemeClass(options);
}
function buildDateProfileGenerator(props) {
var DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
return new DateProfileGeneratorClass(props);
}
function buildViewApi(type, getCurrentData, dateEnv) {
return new ViewApi(type, getCurrentData, dateEnv);
}
function buildEventUiBySource(eventSources) {
return mapHash(eventSources, function (eventSource) { return eventSource.ui; });
}
function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
var eventUiBases = { '': eventUiSingleBase };
for (var defId in eventDefs) {
var def = eventDefs[defId];
if (def.sourceId && eventUiBySource[def.sourceId]) {
eventUiBases[defId] = eventUiBySource[def.sourceId];
}
}
return eventUiBases;
}
function buildViewUiProps(calendarContext) {
var options = calendarContext.options;
return {
eventUiSingleBase: createEventUi({
display: options.eventDisplay,
editable: options.editable,
startEditable: options.eventStartEditable,
durationEditable: options.eventDurationEditable,
constraint: options.eventConstraint,
overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,
allow: options.eventAllow,
backgroundColor: options.eventBackgroundColor,
borderColor: options.eventBorderColor,
textColor: options.eventTextColor,
color: options.eventColor,
// classNames: options.eventClassNames // render hook will handle this
}, calendarContext),
selectionConfig: createEventUi({
constraint: options.selectConstraint,
overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,
allow: options.selectAllow,
}, calendarContext),
};
}
function computeIsLoading(state, context) {
for (var _i = 0, _a = context.pluginHooks.isLoadingFuncs; _i < _a.length; _i++) {
var isLoadingFunc = _a[_i];
if (isLoadingFunc(state)) {
return true;
}
}
return false;
}
function parseContextBusinessHours(calendarContext) {
return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
}
function warnUnknownOptions(options, viewName) {
for (var optionName in options) {
console.warn("Unknown option '" + optionName + "'" +
(viewName ? " for view '" + viewName + "'" : ''));
}
}
// TODO: move this to react plugin?
var CalendarDataProvider = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CalendarDataProvider, _super);
function CalendarDataProvider(props) {
var _this = _super.call(this, props) || this;
_this.handleData = function (data) {
if (!_this.dataManager) { // still within initial run, before assignment in constructor
// eslint-disable-next-line react/no-direct-mutation-state
_this.state = data; // can't use setState yet
}
else {
_this.setState(data);
}
};
_this.dataManager = new CalendarDataManager({
optionOverrides: props.optionOverrides,
calendarApi: props.calendarApi,
onData: _this.handleData,
});
return _this;
}
CalendarDataProvider.prototype.render = function () {
return this.props.children(this.state);
};
CalendarDataProvider.prototype.componentDidUpdate = function (prevProps) {
var newOptionOverrides = this.props.optionOverrides;
if (newOptionOverrides !== prevProps.optionOverrides) { // prevent recursive handleData
this.dataManager.resetOptions(newOptionOverrides);
}
};
return CalendarDataProvider;
}(_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Component));
// HELPERS
/*
if nextDayThreshold is specified, slicing is done in an all-day fashion.
you can get nextDayThreshold from context.nextDayThreshold
*/
function sliceEvents(props, allDay) {
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
}
var NamedTimeZoneImpl = /** @class */ (function () {
function NamedTimeZoneImpl(timeZoneName) {
this.timeZoneName = timeZoneName;
}
return NamedTimeZoneImpl;
}());
var SegHierarchy = /** @class */ (function () {
function SegHierarchy() {
// settings
this.strictOrder = false;
this.allowReslicing = false;
this.maxCoord = -1; // -1 means no max
this.maxStackCnt = -1; // -1 means no max
this.levelCoords = []; // ordered
this.entriesByLevel = []; // parallel with levelCoords
this.stackCnts = {}; // TODO: use better technique!?
}
SegHierarchy.prototype.addSegs = function (inputs) {
var hiddenEntries = [];
for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {
var input = inputs_1[_i];
this.insertEntry(input, hiddenEntries);
}
return hiddenEntries;
};
SegHierarchy.prototype.insertEntry = function (entry, hiddenEntries) {
var insertion = this.findInsertion(entry);
if (this.isInsertionValid(insertion, entry)) {
this.insertEntryAt(entry, insertion);
return 1;
}
return this.handleInvalidInsertion(insertion, entry, hiddenEntries);
};
SegHierarchy.prototype.isInsertionValid = function (insertion, entry) {
return (this.maxCoord === -1 || insertion.levelCoord + entry.thickness <= this.maxCoord) &&
(this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt);
};
// returns number of new entries inserted
SegHierarchy.prototype.handleInvalidInsertion = function (insertion, entry, hiddenEntries) {
if (this.allowReslicing && insertion.touchingEntry) {
return this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
}
hiddenEntries.push(entry);
return 0;
};
SegHierarchy.prototype.splitEntry = function (entry, barrier, hiddenEntries) {
var partCnt = 0;
var splitHiddenEntries = [];
var entrySpan = entry.span;
var barrierSpan = barrier.span;
if (entrySpan.start < barrierSpan.start) {
partCnt += this.insertEntry({
index: entry.index,
thickness: entry.thickness,
span: { start: entrySpan.start, end: barrierSpan.start },
}, splitHiddenEntries);
}
if (entrySpan.end > barrierSpan.end) {
partCnt += this.insertEntry({
index: entry.index,
thickness: entry.thickness,
span: { start: barrierSpan.end, end: entrySpan.end },
}, splitHiddenEntries);
}
if (partCnt) {
hiddenEntries.push.apply(hiddenEntries, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([{
index: entry.index,
thickness: entry.thickness,
span: intersectSpans(barrierSpan, entrySpan), // guaranteed to intersect
}], splitHiddenEntries));
return partCnt;
}
hiddenEntries.push(entry);
return 0;
};
SegHierarchy.prototype.insertEntryAt = function (entry, insertion) {
var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords;
if (insertion.lateral === -1) {
// create a new level
insertAt(levelCoords, insertion.level, insertion.levelCoord);
insertAt(entriesByLevel, insertion.level, [entry]);
}
else {
// insert into existing level
insertAt(entriesByLevel[insertion.level], insertion.lateral, entry);
}
this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
};
SegHierarchy.prototype.findInsertion = function (newEntry) {
var _a = this, levelCoords = _a.levelCoords, entriesByLevel = _a.entriesByLevel, strictOrder = _a.strictOrder, stackCnts = _a.stackCnts;
var levelCnt = levelCoords.length;
var candidateCoord = 0;
var touchingLevel = -1;
var touchingLateral = -1;
var touchingEntry = null;
var stackCnt = 0;
for (var trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
var trackingCoord = levelCoords[trackingLevel];
// if the current level is past the placed entry, we have found a good empty space and can stop.
// if strictOrder, keep finding more lateral intersections.
if (!strictOrder && trackingCoord >= candidateCoord + newEntry.thickness) {
break;
}
var trackingEntries = entriesByLevel[trackingLevel];
var trackingEntry = void 0;
var searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
var lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
while ( // loop through entries that horizontally intersect
(trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
) {
var trackingEntryBottom = trackingCoord + trackingEntry.thickness;
// intersects into the top of the candidate?
if (trackingEntryBottom > candidateCoord) {
candidateCoord = trackingEntryBottom;
touchingEntry = trackingEntry;
touchingLevel = trackingLevel;
touchingLateral = lateralIndex;
}
// butts up against top of candidate? (will happen if just intersected as well)
if (trackingEntryBottom === candidateCoord) {
// accumulate the highest possible stackCnt of the trackingEntries that butt up
stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
}
lateralIndex += 1;
}
}
// the destination level will be after touchingEntry's level. find it
var destLevel = 0;
if (touchingEntry) {
destLevel = touchingLevel + 1;
while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
destLevel += 1;
}
}
// if adding to an existing level, find where to insert
var destLateral = -1;
if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
}
return {
touchingLevel: touchingLevel,
touchingLateral: touchingLateral,
touchingEntry: touchingEntry,
stackCnt: stackCnt,
levelCoord: candidateCoord,
level: destLevel,
lateral: destLateral,
};
};
// sorted by levelCoord (lowest to highest)
SegHierarchy.prototype.toRects = function () {
var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords;
var levelCnt = entriesByLevel.length;
var rects = [];
for (var level = 0; level < levelCnt; level += 1) {
var entries = entriesByLevel[level];
var levelCoord = levelCoords[level];
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
var entry = entries_1[_i];
rects.push((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, entry), { levelCoord: levelCoord }));
}
}
return rects;
};
return SegHierarchy;
}());
function getEntrySpanEnd(entry) {
return entry.span.end;
}
function buildEntryKey(entry) {
return entry.index + ':' + entry.span.start;
}
// returns groups with entries sorted by input order
function groupIntersectingEntries(entries) {
var merges = [];
for (var _i = 0, entries_2 = entries; _i < entries_2.length; _i++) {
var entry = entries_2[_i];
var filteredMerges = [];
var hungryMerge = {
span: entry.span,
entries: [entry],
};
for (var _a = 0, merges_1 = merges; _a < merges_1.length; _a++) {
var merge = merges_1[_a];
if (intersectSpans(merge.span, hungryMerge.span)) {
hungryMerge = {
entries: merge.entries.concat(hungryMerge.entries),
span: joinSpans(merge.span, hungryMerge.span),
};
}
else {
filteredMerges.push(merge);
}
}
filteredMerges.push(hungryMerge);
merges = filteredMerges;
}
return merges;
}
function joinSpans(span0, span1) {
return {
start: Math.min(span0.start, span1.start),
end: Math.max(span0.end, span1.end),
};
}
function intersectSpans(span0, span1) {
var start = Math.max(span0.start, span1.start);
var end = Math.min(span0.end, span1.end);
if (start < end) {
return { start: start, end: end };
}
return null;
}
// general util
// ---------------------------------------------------------------------------------------------------------------------
function insertAt(arr, index, item) {
arr.splice(index, 0, item);
}
function binarySearch(a, searchVal, getItemVal) {
var startIndex = 0;
var endIndex = a.length; // exclusive
if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item
return [0, 0];
}
if (searchVal > getItemVal(a[endIndex - 1])) { // after last item
return [endIndex, 0];
}
while (startIndex < endIndex) {
var middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2);
var middleVal = getItemVal(a[middleIndex]);
if (searchVal < middleVal) {
endIndex = middleIndex;
}
else if (searchVal > middleVal) {
startIndex = middleIndex + 1;
}
else { // equal!
return [middleIndex, 1];
}
}
return [startIndex, 0];
}
var Interaction = /** @class */ (function () {
function Interaction(settings) {
this.component = settings.component;
this.isHitComboAllowed = settings.isHitComboAllowed || null;
}
Interaction.prototype.destroy = function () {
};
return Interaction;
}());
function parseInteractionSettings(component, input) {
return {
component: component,
el: input.el,
useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,
isHitComboAllowed: input.isHitComboAllowed || null,
};
}
function interactionSettingsToStore(settings) {
var _a;
return _a = {},
_a[settings.component.uid] = settings,
_a;
}
// global state
var interactionSettingsStore = {};
/*
An abstraction for a dragging interaction originating on an event.
Does higher-level things than PointerDragger, such as possibly:
- a "mirror" that moves with the pointer
- a minimum number of pixels or other criteria for a true drag to begin
subclasses must emit:
- pointerdown
- dragstart
- dragmove
- pointerup
- dragend
*/
var ElementDragging = /** @class */ (function () {
function ElementDragging(el, selector) {
this.emitter = new Emitter();
}
ElementDragging.prototype.destroy = function () {
};
ElementDragging.prototype.setMirrorIsVisible = function (bool) {
// optional if subclass doesn't want to support a mirror
};
ElementDragging.prototype.setMirrorNeedsRevert = function (bool) {
// optional if subclass doesn't want to support a mirror
};
ElementDragging.prototype.setAutoScrollEnabled = function (bool) {
// optional
};
return ElementDragging;
}());
// TODO: get rid of this in favor of options system,
// tho it's really easy to access this globally rather than pass thru options.
var config = {};
/*
Information about what will happen when an external element is dragged-and-dropped
onto a calendar. Contains information for creating an event.
*/
var DRAG_META_REFINERS = {
startTime: createDuration,
duration: createDuration,
create: Boolean,
sourceId: String,
};
function parseDragMeta(raw) {
var _a = refineProps(raw, DRAG_META_REFINERS), refined = _a.refined, extra = _a.extra;
return {
startTime: refined.startTime || null,
duration: refined.duration || null,
create: refined.create != null ? refined.create : true,
sourceId: refined.sourceId,
leftoverProps: extra,
};
}
var ToolbarSection = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ToolbarSection, _super);
function ToolbarSection() {
return _super !== null && _super.apply(this, arguments) || this;
}
ToolbarSection.prototype.render = function () {
var _this = this;
var children = this.props.widgetGroups.map(function (widgetGroup) { return _this.renderWidgetGroup(widgetGroup); });
return _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['div', { className: 'fc-toolbar-chunk' }], children));
};
ToolbarSection.prototype.renderWidgetGroup = function (widgetGroup) {
var props = this.props;
var theme = this.context.theme;
var children = [];
var isOnlyButtons = true;
for (var _i = 0, widgetGroup_1 = widgetGroup; _i < widgetGroup_1.length; _i++) {
var widget = widgetGroup_1[_i];
var buttonName = widget.buttonName, buttonClick = widget.buttonClick, buttonText = widget.buttonText, buttonIcon = widget.buttonIcon, buttonHint = widget.buttonHint;
if (buttonName === 'title') {
isOnlyButtons = false;
children.push((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title));
}
else {
var isPressed = buttonName === props.activeButton;
var isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
(!props.isPrevEnabled && buttonName === 'prev') ||
(!props.isNextEnabled && buttonName === 'next');
var buttonClasses = ["fc-" + buttonName + "-button", theme.getClass('button')];
if (isPressed) {
buttonClasses.push(theme.getClass('buttonActive'));
}
children.push((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: buttonIcon }) : '')));
}
}
if (children.length > 1) {
var groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
return _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['div', { className: groupClassName }], children));
}
return children[0];
};
return ToolbarSection;
}(BaseComponent));
var Toolbar = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Toolbar, _super);
function Toolbar() {
return _super !== null && _super.apply(this, arguments) || this;
}
Toolbar.prototype.render = function () {
var _a = this.props, model = _a.model, extraClassName = _a.extraClassName;
var forceLtr = false;
var startContent;
var endContent;
var sectionWidgets = model.sectionWidgets;
var centerContent = sectionWidgets.center;
if (sectionWidgets.left) {
forceLtr = true;
startContent = sectionWidgets.left;
}
else {
startContent = sectionWidgets.start;
}
if (sectionWidgets.right) {
forceLtr = true;
endContent = sectionWidgets.right;
}
else {
endContent = sectionWidgets.end;
}
var classNames = [
extraClassName || '',
'fc-toolbar',
forceLtr ? 'fc-toolbar-ltr' : '',
];
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: classNames.join(' ') },
this.renderSection('start', startContent || []),
this.renderSection('center', centerContent || []),
this.renderSection('end', endContent || [])));
};
Toolbar.prototype.renderSection = function (key, widgetGroups) {
var props = this.props;
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId }));
};
return Toolbar;
}(BaseComponent));
// TODO: do function component?
var ViewContainer = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ViewContainer, _super);
function ViewContainer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
availableWidth: null,
};
_this.handleEl = function (el) {
_this.el = el;
setRef(_this.props.elRef, el);
_this.updateAvailableWidth();
};
_this.handleResize = function () {
_this.updateAvailableWidth();
};
return _this;
}
ViewContainer.prototype.render = function () {
var _a = this, props = _a.props, state = _a.state;
var aspectRatio = props.aspectRatio;
var classNames = [
'fc-view-harness',
(aspectRatio || props.liquid || props.height)
? 'fc-view-harness-active' // harness controls the height
: 'fc-view-harness-passive', // let the view do the height
];
var height = '';
var paddingBottom = '';
if (aspectRatio) {
if (state.availableWidth !== null) {
height = state.availableWidth / aspectRatio;
}
else {
// while waiting to know availableWidth, we can't set height to *zero*
// because will cause lots of unnecessary scrollbars within scrollgrid.
// BETTER: don't start rendering ANYTHING yet until we know container width
// NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606)
paddingBottom = (1 / aspectRatio) * 100 + "%";
}
}
else {
height = props.height || '';
}
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height: height, paddingBottom: paddingBottom } }, props.children));
};
ViewContainer.prototype.componentDidMount = function () {
this.context.addResizeHandler(this.handleResize);
};
ViewContainer.prototype.componentWillUnmount = function () {
this.context.removeResizeHandler(this.handleResize);
};
ViewContainer.prototype.updateAvailableWidth = function () {
if (this.el && // needed. but why?
this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth
) {
this.setState({ availableWidth: this.el.offsetWidth });
}
};
return ViewContainer;
}(BaseComponent));
/*
Detects when the user clicks on an event within a DateComponent
*/
var EventClicking = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(EventClicking, _super);
function EventClicking(settings) {
var _this = _super.call(this, settings) || this;
_this.handleSegClick = function (ev, segEl) {
var component = _this.component;
var context = component.context;
var seg = getElSeg(segEl);
if (seg && // might be the surrounding the more link
component.isValidSegDownEl(ev.target)) {
// our way to simulate a link click for elements that can't be
tags
// grab before trigger fired in case trigger trashes DOM thru rerendering
var hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url');
var url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
context.emitter.trigger('eventClick', {
el: segEl,
event: new EventApi(component.context, seg.eventRange.def, seg.eventRange.instance),
jsEvent: ev,
view: context.viewApi,
});
if (url && !ev.defaultPrevented) {
window.location.href = url;
}
}
};
_this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
_this.handleSegClick);
return _this;
}
return EventClicking;
}(Interaction));
/*
Triggers events and adds/removes core classNames when the user's pointer
enters/leaves event-elements of a component.
*/
var EventHovering = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(EventHovering, _super);
function EventHovering(settings) {
var _this = _super.call(this, settings) || this;
// for simulating an eventMouseLeave when the event el is destroyed while mouse is over it
_this.handleEventElRemove = function (el) {
if (el === _this.currentSegEl) {
_this.handleSegLeave(null, _this.currentSegEl);
}
};
_this.handleSegEnter = function (ev, segEl) {
if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
_this.currentSegEl = segEl;
_this.triggerEvent('eventMouseEnter', ev, segEl);
}
};
_this.handleSegLeave = function (ev, segEl) {
if (_this.currentSegEl) {
_this.currentSegEl = null;
_this.triggerEvent('eventMouseLeave', ev, segEl);
}
};
_this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events
_this.handleSegEnter, _this.handleSegLeave);
return _this;
}
EventHovering.prototype.destroy = function () {
this.removeHoverListeners();
};
EventHovering.prototype.triggerEvent = function (publicEvName, ev, segEl) {
var component = this.component;
var context = component.context;
var seg = getElSeg(segEl);
if (!ev || component.isValidSegDownEl(ev.target)) {
context.emitter.trigger(publicEvName, {
el: segEl,
event: new EventApi(context, seg.eventRange.def, seg.eventRange.instance),
jsEvent: ev,
view: context.viewApi,
});
}
};
return EventHovering;
}(Interaction));
var CalendarContent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CalendarContent, _super);
function CalendarContent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildViewContext = memoize(buildViewContext);
_this.buildViewPropTransformers = memoize(buildViewPropTransformers);
_this.buildToolbarProps = memoize(buildToolbarProps);
_this.headerRef = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.footerRef = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.interactionsStore = {};
// eslint-disable-next-line
_this.state = {
viewLabelId: getUniqueDomId(),
};
// Component Registration
// -----------------------------------------------------------------------------------------------------------------
_this.registerInteractiveComponent = function (component, settingsInput) {
var settings = parseInteractionSettings(component, settingsInput);
var DEFAULT_INTERACTIONS = [
EventClicking,
EventHovering,
];
var interactionClasses = DEFAULT_INTERACTIONS.concat(_this.props.pluginHooks.componentInteractions);
var interactions = interactionClasses.map(function (TheInteractionClass) { return new TheInteractionClass(settings); });
_this.interactionsStore[component.uid] = interactions;
interactionSettingsStore[component.uid] = settings;
};
_this.unregisterInteractiveComponent = function (component) {
var listeners = _this.interactionsStore[component.uid];
if (listeners) {
for (var _i = 0, listeners_1 = listeners; _i < listeners_1.length; _i++) {
var listener = listeners_1[_i];
listener.destroy();
}
delete _this.interactionsStore[component.uid];
}
delete interactionSettingsStore[component.uid];
};
// Resizing
// -----------------------------------------------------------------------------------------------------------------
_this.resizeRunner = new DelayedRunner(function () {
_this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
_this.props.emitter.trigger('windowResize', { view: _this.props.viewApi });
});
_this.handleWindowResize = function (ev) {
var options = _this.props.options;
if (options.handleWindowResize &&
ev.target === window // avoid jqui events
) {
_this.resizeRunner.request(options.windowResizeDelay);
}
};
return _this;
}
/*
renders INSIDE of an outer div
*/
CalendarContent.prototype.render = function () {
var props = this.props;
var toolbarConfig = props.toolbarConfig, options = props.options;
var toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
props.viewTitle);
var viewVGrow = false;
var viewHeight = '';
var viewAspectRatio;
if (props.isHeightAuto || props.forPrint) {
viewHeight = '';
}
else if (options.height != null) {
viewVGrow = true;
}
else if (options.contentHeight != null) {
viewHeight = options.contentHeight;
}
else {
viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
}
var viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
var viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
? this.state.viewLabelId
: '';
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewContextType.Provider, { value: viewContext },
toolbarConfig.header && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(Toolbar, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
this.renderView(props),
this.buildAppendContent()),
toolbarConfig.footer && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(Toolbar, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
};
CalendarContent.prototype.componentDidMount = function () {
var props = this.props;
this.calendarInteractions = props.pluginHooks.calendarInteractions
.map(function (CalendarInteractionClass) { return new CalendarInteractionClass(props); });
window.addEventListener('resize', this.handleWindowResize);
var propSetHandlers = props.pluginHooks.propSetHandlers;
for (var propName in propSetHandlers) {
propSetHandlers[propName](props[propName], props);
}
};
CalendarContent.prototype.componentDidUpdate = function (prevProps) {
var props = this.props;
var propSetHandlers = props.pluginHooks.propSetHandlers;
for (var propName in propSetHandlers) {
if (props[propName] !== prevProps[propName]) {
propSetHandlers[propName](props[propName], props);
}
}
};
CalendarContent.prototype.componentWillUnmount = function () {
window.removeEventListener('resize', this.handleWindowResize);
this.resizeRunner.clear();
for (var _i = 0, _a = this.calendarInteractions; _i < _a.length; _i++) {
var interaction = _a[_i];
interaction.destroy();
}
this.props.emitter.trigger('_unmount');
};
CalendarContent.prototype.buildAppendContent = function () {
var props = this.props;
var children = props.pluginHooks.viewContainerAppends.map(function (buildAppendContent) { return buildAppendContent(props); });
return _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Fragment, {}], children));
};
CalendarContent.prototype.renderView = function (props) {
var pluginHooks = props.pluginHooks;
var viewSpec = props.viewSpec;
var viewProps = {
dateProfile: props.dateProfile,
businessHours: props.businessHours,
eventStore: props.renderableEventStore,
eventUiBases: props.eventUiBases,
dateSelection: props.dateSelection,
eventSelection: props.eventSelection,
eventDrag: props.eventDrag,
eventResize: props.eventResize,
isHeightAuto: props.isHeightAuto,
forPrint: props.forPrint,
};
var transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {
var transformer = transformers_1[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)(viewProps, transformer.transform(viewProps, props));
}
var ViewComponent = viewSpec.component;
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewComponent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, viewProps)));
};
return CalendarContent;
}(PureComponent));
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
// don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid
var todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason
var prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);
var nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);
return {
title: title,
activeButton: viewSpec.type,
navUnit: viewSpec.singleUnit,
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
isPrevEnabled: prevInfo.isValid,
isNextEnabled: nextInfo.isValid,
};
}
// Plugin
// -----------------------------------------------------------------------------------------------------------------
function buildViewPropTransformers(theClasses) {
return theClasses.map(function (TheClass) { return new TheClass(); });
}
var CalendarRoot = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CalendarRoot, _super);
function CalendarRoot() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
forPrint: false,
};
_this.handleBeforePrint = function () {
_this.setState({ forPrint: true });
};
_this.handleAfterPrint = function () {
_this.setState({ forPrint: false });
};
return _this;
}
CalendarRoot.prototype.render = function () {
var props = this.props;
var options = props.options;
var forPrint = this.state.forPrint;
var isHeightAuto = forPrint || options.height === 'auto' || options.contentHeight === 'auto';
var height = (!isHeightAuto && options.height != null) ? options.height : '';
var classNames = [
'fc',
forPrint ? 'fc-media-print' : 'fc-media-screen',
"fc-direction-" + options.direction,
props.theme.getClass('root'),
];
if (!getCanVGrowWithinCell()) {
classNames.push('fc-liquid-hack');
}
return props.children(classNames, height, isHeightAuto, forPrint);
};
CalendarRoot.prototype.componentDidMount = function () {
var emitter = this.props.emitter;
emitter.on('_beforeprint', this.handleBeforePrint);
emitter.on('_afterprint', this.handleAfterPrint);
};
CalendarRoot.prototype.componentWillUnmount = function () {
var emitter = this.props.emitter;
emitter.off('_beforeprint', this.handleBeforePrint);
emitter.off('_afterprint', this.handleAfterPrint);
};
return CalendarRoot;
}(BaseComponent));
// Computes a default column header formatting string if `colFormat` is not explicitly defined
function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {
// if more than one week row, or if there are a lot of columns with not much space,
// put just the day numbers will be in each cell
if (!datesRepDistinctDays || dayCnt > 10) {
return createFormatter({ weekday: 'short' }); // "Sat"
}
if (dayCnt > 1) {
return createFormatter({ weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }); // "Sat 11/12"
}
return createFormatter({ weekday: 'long' }); // "Saturday"
}
var CLASS_NAME = 'fc-col-header-cell'; // do the cushion too? no
function renderInner$1(hookProps) {
return hookProps.text;
}
var TableDateCell = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableDateCell, _super);
function TableDateCell() {
return _super !== null && _super.apply(this, arguments) || this;
}
TableDateCell.prototype.render = function () {
var _a = this.context, dateEnv = _a.dateEnv, options = _a.options, theme = _a.theme, viewApi = _a.viewApi;
var props = this.props;
var date = props.date, dateProfile = props.dateProfile;
var dayMeta = getDateMeta(date, props.todayRange, null, dateProfile);
var classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme));
var text = dateEnv.format(date, props.dayHeaderFormat);
// if colCnt is 1, we are already in a day-view and don't need a navlink
var navLinkAttrs = (!dayMeta.isDisabled && props.colCnt > 1)
? buildNavLinkAttrs(this.context, date)
: {};
var hookProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ date: dateEnv.toDate(date), view: viewApi }, props.extraHookProps), { text: text }), dayMeta);
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(' '), "data-date": !dayMeta.isDisabled ? formatDayString(date) : undefined, colSpan: props.colSpan }, props.extraDataAttrs),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: innerElRef, className: [
'fc-col-header-cell-cushion',
props.isSticky ? 'fc-sticky' : '',
].join(' ') }, navLinkAttrs), innerContent))))); }));
};
return TableDateCell;
}(BaseComponent));
var WEEKDAY_FORMAT = createFormatter({ weekday: 'long' });
var TableDowCell = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableDowCell, _super);
function TableDowCell() {
return _super !== null && _super.apply(this, arguments) || this;
}
TableDowCell.prototype.render = function () {
var props = this.props;
var _a = this.context, dateEnv = _a.dateEnv, theme = _a.theme, viewApi = _a.viewApi, options = _a.options;
var date = addDays(new Date(259200000), props.dow); // start with Sun, 04 Jan 1970 00:00:00 GMT
var dateMeta = {
dow: props.dow,
isDisabled: false,
isFuture: false,
isPast: false,
isToday: false,
isOther: false,
};
var classNames = [CLASS_NAME].concat(getDayClassNames(dateMeta, theme), props.extraClassNames || []);
var text = dateEnv.format(date, props.dayHeaderFormat);
var hookProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ // TODO: make this public?
date: date }, dateMeta), { view: viewApi }), props.extraHookProps), { text: text });
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(' '), colSpan: props.colSpan }, props.extraDataAttrs),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-scrollgrid-sync-inner" },
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { "aria-label": dateEnv.format(date, WEEKDAY_FORMAT), className: [
'fc-col-header-cell-cushion',
props.isSticky ? 'fc-sticky' : '',
].join(' '), ref: innerElRef }, innerContent)))); }));
};
return TableDowCell;
}(BaseComponent));
var NowTimer = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(NowTimer, _super);
function NowTimer(props, context) {
var _this = _super.call(this, props, context) || this;
_this.initialNowDate = getNow(context.options.now, context.dateEnv);
_this.initialNowQueriedMs = new Date().valueOf();
_this.state = _this.computeTiming().currentState;
return _this;
}
NowTimer.prototype.render = function () {
var _a = this, props = _a.props, state = _a.state;
return props.children(state.nowDate, state.todayRange);
};
NowTimer.prototype.componentDidMount = function () {
this.setTimeout();
};
NowTimer.prototype.componentDidUpdate = function (prevProps) {
if (prevProps.unit !== this.props.unit) {
this.clearTimeout();
this.setTimeout();
}
};
NowTimer.prototype.componentWillUnmount = function () {
this.clearTimeout();
};
NowTimer.prototype.computeTiming = function () {
var _a = this, props = _a.props, context = _a.context;
var unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs);
var currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit);
var nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit));
var waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf();
// there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)
// ensure no longer than a day
waitMs = Math.min(1000 * 60 * 60 * 24, waitMs);
return {
currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) },
nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) },
waitMs: waitMs,
};
};
NowTimer.prototype.setTimeout = function () {
var _this = this;
var _a = this.computeTiming(), nextState = _a.nextState, waitMs = _a.waitMs;
this.timeoutId = setTimeout(function () {
_this.setState(nextState, function () {
_this.setTimeout();
});
}, waitMs);
};
NowTimer.prototype.clearTimeout = function () {
if (this.timeoutId) {
clearTimeout(this.timeoutId);
}
};
NowTimer.contextType = ViewContextType;
return NowTimer;
}(_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Component));
function buildDayRange(date) {
var start = startOfDay(date);
var end = addDays(start, 1);
return { start: start, end: end };
}
var DayHeader = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayHeader, _super);
function DayHeader() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.createDayHeaderFormatter = memoize(createDayHeaderFormatter);
return _this;
}
DayHeader.prototype.render = function () {
var context = this.context;
var _a = this.props, dates = _a.dates, dateProfile = _a.dateProfile, datesRepDistinctDays = _a.datesRepDistinctDays, renderIntro = _a.renderIntro;
var dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length);
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(NowTimer, { unit: "day" }, function (nowDate, todayRange) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { role: "row" },
renderIntro && renderIntro('day'),
dates.map(function (date) { return (datesRepDistinctDays ? ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableDateCell, { key: date.toISOString(), date: date, dateProfile: dateProfile, todayRange: todayRange, colCnt: dates.length, dayHeaderFormat: dayHeaderFormat })) : ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat: dayHeaderFormat }))); }))); }));
};
return DayHeader;
}(BaseComponent));
function createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) {
return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt);
}
var DaySeriesModel = /** @class */ (function () {
function DaySeriesModel(range, dateProfileGenerator) {
var date = range.start;
var end = range.end;
var indices = [];
var dates = [];
var dayIndex = -1;
while (date < end) { // loop each day from start to end
if (dateProfileGenerator.isHiddenDay(date)) {
indices.push(dayIndex + 0.5); // mark that it's between indices
}
else {
dayIndex += 1;
indices.push(dayIndex);
dates.push(date);
}
date = addDays(date, 1);
}
this.dates = dates;
this.indices = indices;
this.cnt = dates.length;
}
DaySeriesModel.prototype.sliceRange = function (range) {
var firstIndex = this.getDateDayIndex(range.start); // inclusive first index
var lastIndex = this.getDateDayIndex(addDays(range.end, -1)); // inclusive last index
var clippedFirstIndex = Math.max(0, firstIndex);
var clippedLastIndex = Math.min(this.cnt - 1, lastIndex);
// deal with in-between indices
clippedFirstIndex = Math.ceil(clippedFirstIndex); // in-between starts round to next cell
clippedLastIndex = Math.floor(clippedLastIndex); // in-between ends round to prev cell
if (clippedFirstIndex <= clippedLastIndex) {
return {
firstIndex: clippedFirstIndex,
lastIndex: clippedLastIndex,
isStart: firstIndex === clippedFirstIndex,
isEnd: lastIndex === clippedLastIndex,
};
}
return null;
};
// Given a date, returns its chronolocial cell-index from the first cell of the grid.
// If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.
// If before the first offset, returns a negative number.
// If after the last offset, returns an offset past the last cell offset.
// Only works for *start* dates of cells. Will not work for exclusive end dates for cells.
DaySeriesModel.prototype.getDateDayIndex = function (date) {
var indices = this.indices;
var dayOffset = Math.floor(diffDays(this.dates[0], date));
if (dayOffset < 0) {
return indices[0] - 1;
}
if (dayOffset >= indices.length) {
return indices[indices.length - 1] + 1;
}
return indices[dayOffset];
};
return DaySeriesModel;
}());
var DayTableModel = /** @class */ (function () {
function DayTableModel(daySeries, breakOnWeeks) {
var dates = daySeries.dates;
var daysPerRow;
var firstDay;
var rowCnt;
if (breakOnWeeks) {
// count columns until the day-of-week repeats
firstDay = dates[0].getUTCDay();
for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) {
if (dates[daysPerRow].getUTCDay() === firstDay) {
break;
}
}
rowCnt = Math.ceil(dates.length / daysPerRow);
}
else {
rowCnt = 1;
daysPerRow = dates.length;
}
this.rowCnt = rowCnt;
this.colCnt = daysPerRow;
this.daySeries = daySeries;
this.cells = this.buildCells();
this.headerDates = this.buildHeaderDates();
}
DayTableModel.prototype.buildCells = function () {
var rows = [];
for (var row = 0; row < this.rowCnt; row += 1) {
var cells = [];
for (var col = 0; col < this.colCnt; col += 1) {
cells.push(this.buildCell(row, col));
}
rows.push(cells);
}
return rows;
};
DayTableModel.prototype.buildCell = function (row, col) {
var date = this.daySeries.dates[row * this.colCnt + col];
return {
key: date.toISOString(),
date: date,
};
};
DayTableModel.prototype.buildHeaderDates = function () {
var dates = [];
for (var col = 0; col < this.colCnt; col += 1) {
dates.push(this.cells[0][col].date);
}
return dates;
};
DayTableModel.prototype.sliceRange = function (range) {
var colCnt = this.colCnt;
var seriesSeg = this.daySeries.sliceRange(range);
var segs = [];
if (seriesSeg) {
var firstIndex = seriesSeg.firstIndex, lastIndex = seriesSeg.lastIndex;
var index = firstIndex;
while (index <= lastIndex) {
var row = Math.floor(index / colCnt);
var nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1);
segs.push({
row: row,
firstCol: index % colCnt,
lastCol: (nextIndex - 1) % colCnt,
isStart: seriesSeg.isStart && index === firstIndex,
isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex,
});
index = nextIndex;
}
}
return segs;
};
return DayTableModel;
}());
var Slicer = /** @class */ (function () {
function Slicer() {
this.sliceBusinessHours = memoize(this._sliceBusinessHours);
this.sliceDateSelection = memoize(this._sliceDateSpan);
this.sliceEventStore = memoize(this._sliceEventStore);
this.sliceEventDrag = memoize(this._sliceInteraction);
this.sliceEventResize = memoize(this._sliceInteraction);
this.forceDayIfListItem = false; // hack
}
Slicer.prototype.sliceProps = function (props, dateProfile, nextDayThreshold, context) {
var extraArgs = [];
for (var _i = 4; _i < arguments.length; _i++) {
extraArgs[_i - 4] = arguments[_i];
}
var eventUiBases = props.eventUiBases;
var eventSegs = this.sliceEventStore.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([props.eventStore, eventUiBases, dateProfile, nextDayThreshold], extraArgs));
return {
dateSelectionSegs: this.sliceDateSelection.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([props.dateSelection, eventUiBases, context], extraArgs)),
businessHourSegs: this.sliceBusinessHours.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([props.businessHours, dateProfile, nextDayThreshold, context], extraArgs)),
fgEventSegs: eventSegs.fg,
bgEventSegs: eventSegs.bg,
eventDrag: this.sliceEventDrag.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([props.eventDrag, eventUiBases, dateProfile, nextDayThreshold], extraArgs)),
eventResize: this.sliceEventResize.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([props.eventResize, eventUiBases, dateProfile, nextDayThreshold], extraArgs)),
eventSelection: props.eventSelection,
}; // TODO: give interactionSegs?
};
Slicer.prototype.sliceNowDate = function (// does not memoize
date, context) {
var extraArgs = [];
for (var _i = 2; _i < arguments.length; _i++) {
extraArgs[_i - 2] = arguments[_i];
}
return this._sliceDateSpan.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([{ range: { start: date, end: addMs(date, 1) }, allDay: false },
{},
context], extraArgs));
};
Slicer.prototype._sliceBusinessHours = function (businessHours, dateProfile, nextDayThreshold, context) {
var extraArgs = [];
for (var _i = 4; _i < arguments.length; _i++) {
extraArgs[_i - 4] = arguments[_i];
}
if (!businessHours) {
return [];
}
return this._sliceEventStore.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), context),
{},
dateProfile,
nextDayThreshold], extraArgs)).bg;
};
Slicer.prototype._sliceEventStore = function (eventStore, eventUiBases, dateProfile, nextDayThreshold) {
var extraArgs = [];
for (var _i = 4; _i < arguments.length; _i++) {
extraArgs[_i - 4] = arguments[_i];
}
if (eventStore) {
var rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);
return {
bg: this.sliceEventRanges(rangeRes.bg, extraArgs),
fg: this.sliceEventRanges(rangeRes.fg, extraArgs),
};
}
return { bg: [], fg: [] };
};
Slicer.prototype._sliceInteraction = function (interaction, eventUiBases, dateProfile, nextDayThreshold) {
var extraArgs = [];
for (var _i = 4; _i < arguments.length; _i++) {
extraArgs[_i - 4] = arguments[_i];
}
if (!interaction) {
return null;
}
var rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);
return {
segs: this.sliceEventRanges(rangeRes.fg, extraArgs),
affectedInstances: interaction.affectedEvents.instances,
isEvent: interaction.isEvent,
};
};
Slicer.prototype._sliceDateSpan = function (dateSpan, eventUiBases, context) {
var extraArgs = [];
for (var _i = 3; _i < arguments.length; _i++) {
extraArgs[_i - 3] = arguments[_i];
}
if (!dateSpan) {
return [];
}
var eventRange = fabricateEventRange(dateSpan, eventUiBases, context);
var segs = this.sliceRange.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([dateSpan.range], extraArgs));
for (var _a = 0, segs_1 = segs; _a < segs_1.length; _a++) {
var seg = segs_1[_a];
seg.eventRange = eventRange;
}
return segs;
};
/*
"complete" seg means it has component and eventRange
*/
Slicer.prototype.sliceEventRanges = function (eventRanges, extraArgs) {
var segs = [];
for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {
var eventRange = eventRanges_1[_i];
segs.push.apply(segs, this.sliceEventRange(eventRange, extraArgs));
}
return segs;
};
/*
"complete" seg means it has component and eventRange
*/
Slicer.prototype.sliceEventRange = function (eventRange, extraArgs) {
var dateRange = eventRange.range;
// hack to make multi-day events that are being force-displayed as list-items to take up only one day
if (this.forceDayIfListItem && eventRange.ui.display === 'list-item') {
dateRange = {
start: dateRange.start,
end: addDays(dateRange.start, 1),
};
}
var segs = this.sliceRange.apply(this, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([dateRange], extraArgs));
for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {
var seg = segs_2[_i];
seg.eventRange = eventRange;
seg.isStart = eventRange.isStart && seg.isStart;
seg.isEnd = eventRange.isEnd && seg.isEnd;
}
return segs;
};
return Slicer;
}());
/*
for incorporating slotMinTime/slotMaxTime if appropriate
TODO: should be part of DateProfile!
TimelineDateProfile already does this btw
*/
function computeActiveRange(dateProfile, isComponentAllDay) {
var range = dateProfile.activeRange;
if (isComponentAllDay) {
return range;
}
return {
start: addMs(range.start, dateProfile.slotMinTime.milliseconds),
end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5), // 864e5 = ms in a day
};
}
// high-level segmenting-aware tester functions
// ------------------------------------------------------------------------------------------------------------------------
function isInteractionValid(interaction, dateProfile, context) {
var instances = interaction.mutatedEvents.instances;
for (var instanceId in instances) {
if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) {
return false;
}
}
return isNewPropsValid({ eventDrag: interaction }, context); // HACK: the eventDrag props is used for ALL interactions
}
function isDateSelectionValid(dateSelection, dateProfile, context) {
if (!rangeContainsRange(dateProfile.validRange, dateSelection.range)) {
return false;
}
return isNewPropsValid({ dateSelection: dateSelection }, context);
}
function isNewPropsValid(newProps, context) {
var calendarState = context.getCurrentData();
var props = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ businessHours: calendarState.businessHours, dateSelection: '', eventStore: calendarState.eventStore, eventUiBases: calendarState.eventUiBases, eventSelection: '', eventDrag: null, eventResize: null }, newProps);
return (context.pluginHooks.isPropsValid || isPropsValid)(props, context);
}
function isPropsValid(state, context, dateSpanMeta, filterConfig) {
if (dateSpanMeta === void 0) { dateSpanMeta = {}; }
if (state.eventDrag && !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig)) {
return false;
}
if (state.dateSelection && !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig)) {
return false;
}
return true;
}
// Moving Event Validation
// ------------------------------------------------------------------------------------------------------------------------
function isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) {
var currentState = context.getCurrentData();
var interaction = state.eventDrag; // HACK: the eventDrag props is used for ALL interactions
var subjectEventStore = interaction.mutatedEvents;
var subjectDefs = subjectEventStore.defs;
var subjectInstances = subjectEventStore.instances;
var subjectConfigs = compileEventUis(subjectDefs, interaction.isEvent ?
state.eventUiBases :
{ '': currentState.selectionConfig });
if (filterConfig) {
subjectConfigs = mapHash(subjectConfigs, filterConfig);
}
// exclude the subject events. TODO: exclude defs too?
var otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances);
var otherDefs = otherEventStore.defs;
var otherInstances = otherEventStore.instances;
var otherConfigs = compileEventUis(otherDefs, state.eventUiBases);
for (var subjectInstanceId in subjectInstances) {
var subjectInstance = subjectInstances[subjectInstanceId];
var subjectRange = subjectInstance.range;
var subjectConfig = subjectConfigs[subjectInstance.defId];
var subjectDef = subjectDefs[subjectInstance.defId];
// constraint
if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, context)) {
return false;
}
// overlap
var eventOverlap = context.options.eventOverlap;
var eventOverlapFunc = typeof eventOverlap === 'function' ? eventOverlap : null;
for (var otherInstanceId in otherInstances) {
var otherInstance = otherInstances[otherInstanceId];
// intersect! evaluate
if (rangesIntersect(subjectRange, otherInstance.range)) {
var otherOverlap = otherConfigs[otherInstance.defId].overlap;
// consider the other event's overlap. only do this if the subject event is a "real" event
if (otherOverlap === false && interaction.isEvent) {
return false;
}
if (subjectConfig.overlap === false) {
return false;
}
if (eventOverlapFunc && !eventOverlapFunc(new EventApi(context, otherDefs[otherInstance.defId], otherInstance), // still event
new EventApi(context, subjectDef, subjectInstance))) {
return false;
}
}
}
// allow (a function)
var calendarEventStore = currentState.eventStore; // need global-to-calendar, not local to component (splittable)state
for (var _i = 0, _a = subjectConfig.allows; _i < _a.length; _i++) {
var subjectAllow = _a[_i];
var subjectDateSpan = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, dateSpanMeta), { range: subjectInstance.range, allDay: subjectDef.allDay });
var origDef = calendarEventStore.defs[subjectDef.defId];
var origInstance = calendarEventStore.instances[subjectInstanceId];
var eventApi = void 0;
if (origDef) { // was previously in the calendar
eventApi = new EventApi(context, origDef, origInstance);
}
else { // was an external event
eventApi = new EventApi(context, subjectDef); // no instance, because had no dates
}
if (!subjectAllow(buildDateSpanApiWithContext(subjectDateSpan, context), eventApi)) {
return false;
}
}
}
return true;
}
// Date Selection Validation
// ------------------------------------------------------------------------------------------------------------------------
function isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig) {
var relevantEventStore = state.eventStore;
var relevantDefs = relevantEventStore.defs;
var relevantInstances = relevantEventStore.instances;
var selection = state.dateSelection;
var selectionRange = selection.range;
var selectionConfig = context.getCurrentData().selectionConfig;
if (filterConfig) {
selectionConfig = filterConfig(selectionConfig);
}
// constraint
if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, context)) {
return false;
}
// overlap
var selectOverlap = context.options.selectOverlap;
var selectOverlapFunc = typeof selectOverlap === 'function' ? selectOverlap : null;
for (var relevantInstanceId in relevantInstances) {
var relevantInstance = relevantInstances[relevantInstanceId];
// intersect! evaluate
if (rangesIntersect(selectionRange, relevantInstance.range)) {
if (selectionConfig.overlap === false) {
return false;
}
if (selectOverlapFunc && !selectOverlapFunc(new EventApi(context, relevantDefs[relevantInstance.defId], relevantInstance), null)) {
return false;
}
}
}
// allow (a function)
for (var _i = 0, _a = selectionConfig.allows; _i < _a.length; _i++) {
var selectionAllow = _a[_i];
var fullDateSpan = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, dateSpanMeta), selection);
if (!selectionAllow(buildDateSpanApiWithContext(fullDateSpan, context), null)) {
return false;
}
}
return true;
}
// Constraint Utils
// ------------------------------------------------------------------------------------------------------------------------
function allConstraintsPass(constraints, subjectRange, otherEventStore, businessHoursUnexpanded, context) {
for (var _i = 0, constraints_1 = constraints; _i < constraints_1.length; _i++) {
var constraint = constraints_1[_i];
if (!anyRangesContainRange(constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context), subjectRange)) {
return false;
}
}
return true;
}
function constraintToRanges(constraint, subjectRange, // for expanding a recurring constraint, or expanding business hours
otherEventStore, // for if constraint is an even group ID
businessHoursUnexpanded, // for if constraint is 'businessHours'
context) {
if (constraint === 'businessHours') {
return eventStoreToRanges(expandRecurring(businessHoursUnexpanded, subjectRange, context));
}
if (typeof constraint === 'string') { // an group ID
return eventStoreToRanges(filterEventStoreDefs(otherEventStore, function (eventDef) { return eventDef.groupId === constraint; }));
}
if (typeof constraint === 'object' && constraint) { // non-null object
return eventStoreToRanges(expandRecurring(constraint, subjectRange, context));
}
return []; // if it's false
}
// TODO: move to event-store file?
function eventStoreToRanges(eventStore) {
var instances = eventStore.instances;
var ranges = [];
for (var instanceId in instances) {
ranges.push(instances[instanceId].range);
}
return ranges;
}
// TODO: move to geom file?
function anyRangesContainRange(outerRanges, innerRange) {
for (var _i = 0, outerRanges_1 = outerRanges; _i < outerRanges_1.length; _i++) {
var outerRange = outerRanges_1[_i];
if (rangeContainsRange(outerRange, innerRange)) {
return true;
}
}
return false;
}
var VISIBLE_HIDDEN_RE = /^(visible|hidden)$/;
var Scroller = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Scroller, _super);
function Scroller() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.handleEl = function (el) {
_this.el = el;
setRef(_this.props.elRef, el);
};
return _this;
}
Scroller.prototype.render = function () {
var props = this.props;
var liquid = props.liquid, liquidIsAbsolute = props.liquidIsAbsolute;
var isAbsolute = liquid && liquidIsAbsolute;
var className = ['fc-scroller'];
if (liquid) {
if (liquidIsAbsolute) {
className.push('fc-scroller-liquid-absolute');
}
else {
className.push('fc-scroller-liquid');
}
}
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: this.handleEl, className: className.join(' '), style: {
overflowX: props.overflowX,
overflowY: props.overflowY,
left: (isAbsolute && -(props.overcomeLeft || 0)) || '',
right: (isAbsolute && -(props.overcomeRight || 0)) || '',
bottom: (isAbsolute && -(props.overcomeBottom || 0)) || '',
marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || '',
marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || '',
marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || '',
maxHeight: props.maxHeight || '',
} }, props.children));
};
Scroller.prototype.needsXScrolling = function () {
if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {
return false;
}
// testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers.
// much more reliable to see if children are taller than the scroller, even tho doesn't account for
// inner-child margins and absolute positioning
var el = this.el;
var realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth();
var children = el.children;
for (var i = 0; i < children.length; i += 1) {
var childEl = children[i];
if (childEl.getBoundingClientRect().width > realClientWidth) {
return true;
}
}
return false;
};
Scroller.prototype.needsYScrolling = function () {
if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {
return false;
}
// testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers.
// much more reliable to see if children are taller than the scroller, even tho doesn't account for
// inner-child margins and absolute positioning
var el = this.el;
var realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth();
var children = el.children;
for (var i = 0; i < children.length; i += 1) {
var childEl = children[i];
if (childEl.getBoundingClientRect().height > realClientHeight) {
return true;
}
}
return false;
};
Scroller.prototype.getXScrollbarWidth = function () {
if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {
return 0;
}
return this.el.offsetHeight - this.el.clientHeight; // only works because we guarantee no borders. TODO: add to CSS with important?
};
Scroller.prototype.getYScrollbarWidth = function () {
if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {
return 0;
}
return this.el.offsetWidth - this.el.clientWidth; // only works because we guarantee no borders. TODO: add to CSS with important?
};
return Scroller;
}(BaseComponent));
/*
TODO: somehow infer OtherArgs from masterCallback?
TODO: infer RefType from masterCallback if provided
*/
var RefMap = /** @class */ (function () {
function RefMap(masterCallback) {
var _this = this;
this.masterCallback = masterCallback;
this.currentMap = {};
this.depths = {};
this.callbackMap = {};
this.handleValue = function (val, key) {
var _a = _this, depths = _a.depths, currentMap = _a.currentMap;
var removed = false;
var added = false;
if (val !== null) {
// for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore
removed = (key in currentMap);
currentMap[key] = val;
depths[key] = (depths[key] || 0) + 1;
added = true;
}
else {
depths[key] -= 1;
if (!depths[key]) {
delete currentMap[key];
delete _this.callbackMap[key];
removed = true;
}
}
if (_this.masterCallback) {
if (removed) {
_this.masterCallback(null, String(key));
}
if (added) {
_this.masterCallback(val, String(key));
}
}
};
}
RefMap.prototype.createRef = function (key) {
var _this = this;
var refCallback = this.callbackMap[key];
if (!refCallback) {
refCallback = this.callbackMap[key] = function (val) {
_this.handleValue(val, String(key));
};
}
return refCallback;
};
// TODO: check callers that don't care about order. should use getAll instead
// NOTE: this method has become less valuable now that we are encouraged to map order by some other index
// TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and "collect"
RefMap.prototype.collect = function (startIndex, endIndex, step) {
return collectFromHash(this.currentMap, startIndex, endIndex, step);
};
RefMap.prototype.getAll = function () {
return hashValuesToArray(this.currentMap);
};
return RefMap;
}());
function computeShrinkWidth(chunkEls) {
var shrinkCells = findElements(chunkEls, '.fc-scrollgrid-shrink');
var largestWidth = 0;
for (var _i = 0, shrinkCells_1 = shrinkCells; _i < shrinkCells_1.length; _i++) {
var shrinkCell = shrinkCells_1[_i];
largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell));
}
return Math.ceil(largestWidth); // elements work best with integers. round up to ensure contents fits
}
function getSectionHasLiquidHeight(props, sectionConfig) {
return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)
}
function getAllowYScrolling(props, sectionConfig) {
return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars
getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars
}
// TODO: ONLY use `arg`. force out internal function to use same API
function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) {
var expandRows = arg.expandRows;
var content = typeof chunkConfig.content === 'function' ?
chunkConfig.content(arg) :
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)('table', {
role: 'presentation',
className: [
chunkConfig.tableClassName,
sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',
].join(' '),
style: {
minWidth: arg.tableMinWidth,
width: arg.clientWidth,
height: expandRows ? arg.clientHeight : '', // css `height` on a serves as a min-height
},
}, arg.tableColGroupNode, (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(isHeader ? 'thead' : 'tbody', {
role: 'presentation',
}, typeof chunkConfig.rowContent === 'function'
? chunkConfig.rowContent(arg)
: chunkConfig.rowContent));
return content;
}
function isColPropsEqual(cols0, cols1) {
return isArraysEqual(cols0, cols1, isPropsEqual);
}
function renderMicroColGroup(cols, shrinkWidth) {
var colNodes = [];
/*
for ColProps with spans, it would have been great to make a single
HOWEVER, Chrome was getting messing up distributing the width to / elements with colspans.
SOLUTION: making individual elements makes Chrome behave.
*/
for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {
var colProps = cols_1[_i];
var span = colProps.span || 1;
for (var i = 0; i < span; i += 1) {
colNodes.push((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("col", { style: {
width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''),
minWidth: colProps.minWidth || '',
} }));
}
}
return _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['colgroup', {}], colNodes));
}
function sanitizeShrinkWidth(shrinkWidth) {
/* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth
4 accounts for 2 2-pixel borders. TODO: better solution? */
return shrinkWidth == null ? 4 : shrinkWidth;
}
function hasShrinkWidth(cols) {
for (var _i = 0, cols_2 = cols; _i < cols_2.length; _i++) {
var col = cols_2[_i];
if (col.width === 'shrink') {
return true;
}
}
return false;
}
function getScrollGridClassNames(liquid, context) {
var classNames = [
'fc-scrollgrid',
context.theme.getClass('table'),
];
if (liquid) {
classNames.push('fc-scrollgrid-liquid');
}
return classNames;
}
function getSectionClassNames(sectionConfig, wholeTableVGrow) {
var classNames = [
'fc-scrollgrid-section',
"fc-scrollgrid-section-" + sectionConfig.type,
sectionConfig.className, // used?
];
if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) {
classNames.push('fc-scrollgrid-section-liquid');
}
if (sectionConfig.isSticky) {
classNames.push('fc-scrollgrid-section-sticky');
}
return classNames;
}
function renderScrollShim(arg) {
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-scrollgrid-sticky-shim", style: {
width: arg.clientWidth,
minWidth: arg.tableMinWidth,
} }));
}
function getStickyHeaderDates(options) {
var stickyHeaderDates = options.stickyHeaderDates;
if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {
stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto';
}
return stickyHeaderDates;
}
function getStickyFooterScrollbar(options) {
var stickyFooterScrollbar = options.stickyFooterScrollbar;
if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {
stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto';
}
return stickyFooterScrollbar;
}
var SimpleScrollGrid = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(SimpleScrollGrid, _super);
function SimpleScrollGrid() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.processCols = memoize(function (a) { return a; }, isColPropsEqual); // so we get same `cols` props every time
// yucky to memoize VNodes, but much more efficient for consumers
_this.renderMicroColGroup = memoize(renderMicroColGroup);
_this.scrollerRefs = new RefMap();
_this.scrollerElRefs = new RefMap(_this._handleScrollerEl.bind(_this));
_this.state = {
shrinkWidth: null,
forceYScrollbars: false,
scrollerClientWidths: {},
scrollerClientHeights: {},
};
// TODO: can do a really simple print-view. dont need to join rows
_this.handleSizing = function () {
_this.setState((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ shrinkWidth: _this.computeShrinkWidth() }, _this.computeScrollerDims()));
};
return _this;
}
SimpleScrollGrid.prototype.render = function () {
var _a = this, props = _a.props, state = _a.state, context = _a.context;
var sectionConfigs = props.sections || [];
var cols = this.processCols(props.cols);
var microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth);
var classNames = getScrollGridClassNames(props.liquid, context);
if (props.collapsibleWidth) {
classNames.push('fc-scrollgrid-collapsible');
}
// TODO: make DRY
var configCnt = sectionConfigs.length;
var configI = 0;
var currentConfig;
var headSectionNodes = [];
var bodySectionNodes = [];
var footSectionNodes = [];
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
configI += 1;
}
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false));
configI += 1;
}
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));
configI += 1;
}
// firefox bug: when setting height on table and there is a thead or tfoot,
// the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524)
// use getCanVGrowWithinCell as a way to detect table-stupid firefox.
// if so, use a simpler dom structure, jam everything into a lone tbody.
var isBuggy = !getCanVGrowWithinCell();
var roleAttrs = { role: 'rowgroup' };
return (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)('table', {
role: 'grid',
className: classNames.join(' '),
style: { height: props.height },
}, Boolean(!isBuggy && headSectionNodes.length) && _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['thead', roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['tbody', roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['tfoot', roleAttrs], footSectionNodes)), isBuggy && _vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)(['tbody', roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes)));
};
SimpleScrollGrid.prototype.renderSection = function (sectionConfig, microColGroupNode, isHeader) {
if ('outerContent' in sectionConfig) {
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
}
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)));
};
SimpleScrollGrid.prototype.renderChunkTd = function (sectionConfig, microColGroupNode, chunkConfig, isHeader) {
if ('outerContent' in chunkConfig) {
return chunkConfig.outerContent;
}
var props = this.props;
var _a = this.state, forceYScrollbars = _a.forceYScrollbars, scrollerClientWidths = _a.scrollerClientWidths, scrollerClientHeights = _a.scrollerClientHeights;
var needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config?
var isLiquid = getSectionHasLiquidHeight(props, sectionConfig);
// for `!props.liquid` - is WHOLE scrollgrid natural height?
// TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars
var overflowY = !props.liquid ? 'visible' :
forceYScrollbars ? 'scroll' :
!needsYScrolling ? 'hidden' :
'auto';
var sectionKey = sectionConfig.key;
var content = renderChunkContent(sectionConfig, chunkConfig, {
tableColGroupNode: microColGroupNode,
tableMinWidth: '',
clientWidth: (!props.collapsibleWidth && scrollerClientWidths[sectionKey] !== undefined) ? scrollerClientWidths[sectionKey] : null,
clientHeight: scrollerClientHeights[sectionKey] !== undefined ? scrollerClientHeights[sectionKey] : null,
expandRows: sectionConfig.expandRows,
syncRowHeights: false,
rowSyncHeights: [],
reportRowHeightChange: function () { },
}, isHeader);
return (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(isHeader ? 'th' : 'td', {
ref: chunkConfig.elRef,
role: 'presentation',
}, (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-scroller-harness" + (isLiquid ? ' fc-scroller-harness-liquid' : '') },
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY: overflowY, overflowX: !props.liquid ? 'visible' : 'hidden' /* natural height? */, maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute // because its within a harness
: true }, content)));
};
SimpleScrollGrid.prototype._handleScrollerEl = function (scrollerEl, key) {
var section = getSectionByKey(this.props.sections, key);
if (section) {
setRef(section.chunk.scrollerElRef, scrollerEl);
}
};
SimpleScrollGrid.prototype.componentDidMount = function () {
this.handleSizing();
this.context.addResizeHandler(this.handleSizing);
};
SimpleScrollGrid.prototype.componentDidUpdate = function () {
// TODO: need better solution when state contains non-sizing things
this.handleSizing();
};
SimpleScrollGrid.prototype.componentWillUnmount = function () {
this.context.removeResizeHandler(this.handleSizing);
};
SimpleScrollGrid.prototype.computeShrinkWidth = function () {
return hasShrinkWidth(this.props.cols)
? computeShrinkWidth(this.scrollerElRefs.getAll())
: 0;
};
SimpleScrollGrid.prototype.computeScrollerDims = function () {
var scrollbarWidth = getScrollbarWidths();
var _a = this, scrollerRefs = _a.scrollerRefs, scrollerElRefs = _a.scrollerElRefs;
var forceYScrollbars = false;
var scrollerClientWidths = {};
var scrollerClientHeights = {};
for (var sectionKey in scrollerRefs.currentMap) {
var scroller = scrollerRefs.currentMap[sectionKey];
if (scroller && scroller.needsYScrolling()) {
forceYScrollbars = true;
break;
}
}
for (var _i = 0, _b = this.props.sections; _i < _b.length; _i++) {
var section = _b[_i];
var sectionKey = section.key;
var scrollerEl = scrollerElRefs.currentMap[sectionKey];
if (scrollerEl) {
var harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders
scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars
? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future
: 0));
scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height);
}
}
return { forceYScrollbars: forceYScrollbars, scrollerClientWidths: scrollerClientWidths, scrollerClientHeights: scrollerClientHeights };
};
return SimpleScrollGrid;
}(BaseComponent));
SimpleScrollGrid.addStateEquality({
scrollerClientWidths: isPropsEqual,
scrollerClientHeights: isPropsEqual,
});
function getSectionByKey(sections, key) {
for (var _i = 0, sections_1 = sections; _i < sections_1.length; _i++) {
var section = sections_1[_i];
if (section.key === key) {
return section;
}
}
return null;
}
var EventRoot = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(EventRoot, _super);
function EventRoot() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.elRef = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
EventRoot.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var options = context.options;
var seg = props.seg;
var eventRange = seg.eventRange;
var ui = eventRange.ui;
var hookProps = {
event: new EventApi(context, eventRange.def, eventRange.instance),
view: context.viewApi,
timeText: props.timeText,
textColor: ui.textColor,
backgroundColor: ui.backgroundColor,
borderColor: ui.borderColor,
isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
isStart: Boolean(seg.isStart),
isEnd: Boolean(seg.isEnd),
isPast: Boolean(props.isPast),
isFuture: Boolean(props.isFuture),
isToday: Boolean(props.isToday),
isSelected: Boolean(props.isSelected),
isDragging: Boolean(props.isDragging),
isResizing: Boolean(props.isResizing),
};
var standardClassNames = getEventClassNames(hookProps).concat(ui.classNames);
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { hookProps: hookProps, classNames: options.eventClassNames, content: options.eventContent, defaultContent: props.defaultContent, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount, elRef: this.elRef }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, standardClassNames.concat(customClassNames), innerElRef, innerContent, hookProps); }));
};
EventRoot.prototype.componentDidMount = function () {
setElSeg(this.elRef.current, this.props.seg);
};
/*
need to re-assign seg to the element if seg changes, even if the element is the same
*/
EventRoot.prototype.componentDidUpdate = function (prevProps) {
var seg = this.props.seg;
if (seg !== prevProps.seg) {
setElSeg(this.elRef.current, seg);
}
};
return EventRoot;
}(BaseComponent));
// should not be a purecomponent
var StandardEvent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(StandardEvent, _super);
function StandardEvent() {
return _super !== null && _super.apply(this, arguments) || this;
}
StandardEvent.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var seg = props.seg;
var timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat;
var timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(EventRoot, { seg: seg, timeText: timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent$1, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ className: props.extraClassNames.concat(classNames).join(' '), style: {
borderColor: hookProps.borderColor,
backgroundColor: hookProps.backgroundColor,
}, ref: rootElRef }, getSegAnchorAttrs(seg, context)),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-main", ref: innerElRef, style: { color: hookProps.textColor } }, innerContent),
hookProps.isStartResizable &&
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-resizer fc-event-resizer-start" }),
hookProps.isEndResizable &&
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-resizer fc-event-resizer-end" }))); }));
};
return StandardEvent;
}(BaseComponent));
function renderInnerContent$1(innerProps) {
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-main-frame" },
innerProps.timeText && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-time" }, innerProps.timeText)),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-title-container" },
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "\u00A0")))));
}
var NowIndicatorRoot = function (props) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewContextType.Consumer, null, function (context) {
var options = context.options;
var hookProps = {
isAxis: props.isAxis,
date: context.dateEnv.toDate(props.date),
view: context.viewApi,
};
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { hookProps: hookProps, classNames: options.nowIndicatorClassNames, content: options.nowIndicatorContent, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children));
})); };
var DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
var DayCellContent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayCellContent, _super);
function DayCellContent() {
return _super !== null && _super.apply(this, arguments) || this;
}
DayCellContent.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var options = context.options;
var hookProps = refineDayCellHookProps({
date: props.date,
dateProfile: props.dateProfile,
todayRange: props.todayRange,
showDayNumber: props.showDayNumber,
extraProps: props.extraHookProps,
viewApi: context.viewApi,
dateEnv: context.dateEnv,
});
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ContentHook, { hookProps: hookProps, content: options.dayCellContent, defaultContent: props.defaultContent }, props.children));
};
return DayCellContent;
}(BaseComponent));
function refineDayCellHookProps(raw) {
var date = raw.date, dateEnv = raw.dateEnv;
var dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile);
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { dayNumberText: raw.showDayNumber ? dateEnv.format(date, DAY_NUM_FORMAT) : '' }), raw.extraProps);
}
var DayCellRoot = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayCellRoot, _super);
function DayCellRoot() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.refineHookProps = memoizeObjArg(refineDayCellHookProps);
_this.normalizeClassNames = buildClassNameNormalizer();
return _this;
}
DayCellRoot.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var options = context.options;
var hookProps = this.refineHookProps({
date: props.date,
dateProfile: props.dateProfile,
todayRange: props.todayRange,
showDayNumber: props.showDayNumber,
extraProps: props.extraHookProps,
viewApi: context.viewApi,
dateEnv: context.dateEnv,
});
var classNames = getDayClassNames(hookProps, context.theme).concat(hookProps.isDisabled
? [] // don't use custom classNames if disabled
: this.normalizeClassNames(options.dayCellClassNames, hookProps));
var dataAttrs = hookProps.isDisabled ? {} : {
'data-date': formatDayString(props.date),
};
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(MountHook, { hookProps: hookProps, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount, elRef: props.elRef }, function (rootElRef) { return props.children(rootElRef, classNames, dataAttrs, hookProps.isDisabled); }));
};
return DayCellRoot;
}(BaseComponent));
function renderFill(fillType) {
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-" + fillType }));
}
var BgEvent = function (props) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(EventRoot, { defaultContent: renderInnerContent, seg: props.seg /* uselesss i think */, timeText: "", disableDragging: true, disableResizing: true, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: ['fc-bg-event'].concat(classNames).join(' '), style: {
backgroundColor: hookProps.backgroundColor,
} }, innerContent)); })); };
function renderInnerContent(props) {
var title = props.event.title;
return title && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-title" }, props.event.title));
}
var WeekNumberRoot = function (props) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewContextType.Consumer, null, function (context) {
var dateEnv = context.dateEnv, options = context.options;
var date = props.date;
var format = options.weekNumberFormat || props.defaultFormat;
var num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well?
var text = dateEnv.format(date, format);
var hookProps = { num: num, text: text, date: date };
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { hookProps: hookProps, classNames: options.weekNumberClassNames, content: options.weekNumberContent, defaultContent: renderInner, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children));
})); };
function renderInner(innerProps) {
return innerProps.text;
}
var PADDING_FROM_VIEWPORT = 10;
var Popover = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Popover, _super);
function Popover() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
titleId: getUniqueDomId(),
};
_this.handleRootEl = function (el) {
_this.rootEl = el;
if (_this.props.elRef) {
setRef(_this.props.elRef, el);
}
};
// Triggered when the user clicks *anywhere* in the document, for the autoHide feature
_this.handleDocumentMouseDown = function (ev) {
// only hide the popover if the click happened outside the popover
var target = getEventTargetViaRoot(ev);
if (!_this.rootEl.contains(target)) {
_this.handleCloseClick();
}
};
_this.handleDocumentKeyDown = function (ev) {
if (ev.key === 'Escape') {
_this.handleCloseClick();
}
};
_this.handleCloseClick = function () {
var onClose = _this.props.onClose;
if (onClose) {
onClose();
}
};
return _this;
}
Popover.prototype.render = function () {
var _a = this.context, theme = _a.theme, options = _a.options;
var _b = this, props = _b.props, state = _b.state;
var classNames = [
'fc-popover',
theme.getClass('popover'),
].concat(props.extraClassNames || []);
return (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createPortal)((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId }, props.extraAttrs, { ref: this.handleRootEl }),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "fc-popover-title", id: state.titleId }, props.title),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
};
Popover.prototype.componentDidMount = function () {
document.addEventListener('mousedown', this.handleDocumentMouseDown);
document.addEventListener('keydown', this.handleDocumentKeyDown);
this.updateSize();
};
Popover.prototype.componentWillUnmount = function () {
document.removeEventListener('mousedown', this.handleDocumentMouseDown);
document.removeEventListener('keydown', this.handleDocumentKeyDown);
};
Popover.prototype.updateSize = function () {
var isRtl = this.context.isRtl;
var _a = this.props, alignmentEl = _a.alignmentEl, alignGridTop = _a.alignGridTop;
var rootEl = this.rootEl;
var alignmentRect = computeClippedClientRect(alignmentEl);
if (alignmentRect) {
var popoverDims = rootEl.getBoundingClientRect();
// position relative to viewport
var popoverTop = alignGridTop
? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top
: alignmentRect.top;
var popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;
// constrain
popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);
popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);
popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);
var origin_1 = rootEl.offsetParent.getBoundingClientRect();
applyStyle(rootEl, {
top: popoverTop - origin_1.top,
left: popoverLeft - origin_1.left,
});
}
};
return Popover;
}(BaseComponent));
var MorePopover = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(MorePopover, _super);
function MorePopover() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.handleRootEl = function (rootEl) {
_this.rootEl = rootEl;
if (rootEl) {
_this.context.registerInteractiveComponent(_this, {
el: rootEl,
useEventCenter: false,
});
}
else {
_this.context.unregisterInteractiveComponent(_this);
}
};
return _this;
}
MorePopover.prototype.render = function () {
var _a = this.context, options = _a.options, dateEnv = _a.dateEnv;
var props = this.props;
var startDate = props.startDate, todayRange = props.todayRange, dateProfile = props.dateProfile;
var title = dateEnv.format(startDate, options.dayPopoverFormat);
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(DayCellRoot, { date: startDate, dateProfile: dateProfile, todayRange: todayRange, elRef: this.handleRootEl }, function (rootElRef, dayClassNames, dataAttrs) { return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(Popover, { elRef: rootElRef, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(dayClassNames), extraAttrs: dataAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(DayCellContent, { date: startDate, dateProfile: dateProfile, todayRange: todayRange }, function (innerElRef, innerContent) { return (innerContent &&
(0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-more-popover-misc", ref: innerElRef }, innerContent)); }),
props.children)); }));
};
MorePopover.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {
var _a = this, rootEl = _a.rootEl, props = _a.props;
if (positionLeft >= 0 && positionLeft < elWidth &&
positionTop >= 0 && positionTop < elHeight) {
return {
dateProfile: props.dateProfile,
dateSpan: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ allDay: true, range: {
start: props.startDate,
end: props.endDate,
} }, props.extraDateSpan),
dayEl: rootEl,
rect: {
left: 0,
top: 0,
right: elWidth,
bottom: elHeight,
},
layer: 1, // important when comparing with hits from other components
};
}
return null;
};
return MorePopover;
}(DateComponent));
var MoreLinkRoot = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(MoreLinkRoot, _super);
function MoreLinkRoot() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.linkElRef = (0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.state = {
isPopoverOpen: false,
popoverId: getUniqueDomId(),
};
_this.handleClick = function (ev) {
var _a = _this, props = _a.props, context = _a.context;
var moreLinkClick = context.options.moreLinkClick;
var date = computeRange(props).start;
function buildPublicSeg(seg) {
var _a = seg.eventRange, def = _a.def, instance = _a.instance, range = _a.range;
return {
event: new EventApi(context, def, instance),
start: context.dateEnv.toDate(range.start),
end: context.dateEnv.toDate(range.end),
isStart: seg.isStart,
isEnd: seg.isEnd,
};
}
if (typeof moreLinkClick === 'function') {
moreLinkClick = moreLinkClick({
date: date,
allDay: Boolean(props.allDayDate),
allSegs: props.allSegs.map(buildPublicSeg),
hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
jsEvent: ev,
view: context.viewApi,
});
}
if (!moreLinkClick || moreLinkClick === 'popover') {
_this.setState({ isPopoverOpen: true });
}
else if (typeof moreLinkClick === 'string') { // a view name
context.calendarApi.zoomTo(date, moreLinkClick);
}
};
_this.handlePopoverClose = function () {
_this.setState({ isPopoverOpen: false });
};
return _this;
}
MoreLinkRoot.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, state = _a.state;
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(ViewContextType.Consumer, null, function (context) {
var viewApi = context.viewApi, options = context.options, calendarApi = context.calendarApi;
var moreLinkText = options.moreLinkText;
var moreCnt = props.moreCnt;
var range = computeRange(props);
var text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
? moreLinkText.call(calendarApi, moreCnt)
: "+" + moreCnt + " " + moreLinkText;
var title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
var hookProps = {
num: moreCnt,
shortText: "+" + moreCnt,
text: text,
view: viewApi,
};
return ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(_vdom_js__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
Boolean(props.moreCnt) && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(RenderHook, { elRef: _this.linkElRef, hookProps: hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: props.defaultContent || renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, ['fc-more-link'].concat(customClassNames), innerElRef, innerContent, _this.handleClick, title, state.isPopoverOpen, state.isPopoverOpen ? state.popoverId : ''); })),
state.isPopoverOpen && ((0,_vdom_js__WEBPACK_IMPORTED_MODULE_1__.createElement)(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: _this.parentEl, alignmentEl: props.alignmentElRef.current, alignGridTop: props.alignGridTop, onClose: _this.handlePopoverClose }, props.popoverContent()))));
}));
};
MoreLinkRoot.prototype.componentDidMount = function () {
this.updateParentEl();
};
MoreLinkRoot.prototype.componentDidUpdate = function () {
this.updateParentEl();
};
MoreLinkRoot.prototype.updateParentEl = function () {
if (this.linkElRef.current) {
this.parentEl = elementClosest(this.linkElRef.current, '.fc-view-harness');
}
};
return MoreLinkRoot;
}(BaseComponent));
function renderMoreLinkInner(props) {
return props.text;
}
function computeRange(props) {
if (props.allDayDate) {
return {
start: props.allDayDate,
end: addDays(props.allDayDate, 1),
};
}
var hiddenSegs = props.hiddenSegs;
return {
start: computeEarliestSegStart(hiddenSegs),
end: computeLatestSegEnd(hiddenSegs),
};
}
function computeEarliestSegStart(segs) {
return segs.reduce(pickEarliestStart).eventRange.range.start;
}
function pickEarliestStart(seg0, seg1) {
return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;
}
function computeLatestSegEnd(segs) {
return segs.reduce(pickLatestEnd).eventRange.range.end;
}
function pickLatestEnd(seg0, seg1) {
return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;
}
// exports
// --------------------------------------------------------------------------------------------------
var version = '5.10.2'; // important to type it, so .d.ts has generic string
//# sourceMappingURL=main.js.map
/***/ }),
/***/ "./node_modules/@fullcalendar/common/vdom.js":
/*!***************************************************!*\
!*** ./node_modules/@fullcalendar/common/vdom.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Component": function() { return /* binding */ Component; },
/* harmony export */ "Fragment": function() { return /* binding */ Fragment; },
/* harmony export */ "createContext": function() { return /* binding */ createContext; },
/* harmony export */ "createElement": function() { return /* binding */ createElement; },
/* harmony export */ "createPortal": function() { return /* binding */ createPortal; },
/* harmony export */ "createRef": function() { return /* binding */ createRef; },
/* harmony export */ "flushSync": function() { return /* binding */ flushSync; },
/* harmony export */ "render": function() { return /* binding */ render; },
/* harmony export */ "unmountComponentAtNode": function() { return /* binding */ unmountComponentAtNode; }
/* harmony export */ });
///
if (typeof FullCalendarVDom === 'undefined') {
throw new Error('Please import the top-level fullcalendar lib before attempting to import a plugin.');
}
var Component = FullCalendarVDom.Component;
var createElement = FullCalendarVDom.createElement;
var render = FullCalendarVDom.render;
var createRef = FullCalendarVDom.createRef;
var Fragment = FullCalendarVDom.Fragment;
var createContext = FullCalendarVDom.createContext;
var createPortal = FullCalendarVDom.createPortal;
var flushSync = FullCalendarVDom.flushSync;
var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode;
/* eslint-enable */
/***/ }),
/***/ "./node_modules/@fullcalendar/daygrid/main.js":
/*!****************************************************!*\
!*** ./node_modules/@fullcalendar/daygrid/main.js ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DayGridView": function() { return /* binding */ DayTableView; },
/* harmony export */ "DayTable": function() { return /* binding */ DayTable; },
/* harmony export */ "DayTableSlicer": function() { return /* binding */ DayTableSlicer; },
/* harmony export */ "Table": function() { return /* binding */ Table; },
/* harmony export */ "TableView": function() { return /* binding */ TableView; },
/* harmony export */ "buildDayTableModel": function() { return /* binding */ buildDayTableModel; }
/* harmony export */ });
/* harmony import */ var _main_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main.css */ "./node_modules/@fullcalendar/daygrid/main.css");
/* harmony import */ var _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @fullcalendar/common */ "./node_modules/@fullcalendar/common/main.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/*!
FullCalendar v5.10.2
Docs & License: https://fullcalendar.io/
(c) 2021 Adam Shaw
*/
/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.
----------------------------------------------------------------------------------------------------------------------*/
// It is a manager for a Table subcomponent, which does most of the heavy lifting.
// It is responsible for managing width/height.
var TableView = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableView, _super);
function TableView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.headerElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
TableView.prototype.renderSimpleLayout = function (headerRowContent, bodyContent) {
var _a = this, props = _a.props, context = _a.context;
var sections = [];
var stickyHeaderDates = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getStickyHeaderDates)(context.options);
if (headerRowContent) {
sections.push({
type: 'header',
key: 'header',
isSticky: stickyHeaderDates,
chunk: {
elRef: this.headerElRef,
tableClassName: 'fc-col-header',
rowContent: headerRowContent,
},
});
}
sections.push({
type: 'body',
key: 'body',
liquid: true,
chunk: { content: bodyContent },
});
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: ['fc-daygrid'].concat(classNames).join(' ') },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections }))); }));
};
TableView.prototype.renderHScrollLayout = function (headerRowContent, bodyContent, colCnt, dayMinWidth) {
var ScrollGrid = this.context.pluginHooks.scrollGridImpl;
if (!ScrollGrid) {
throw new Error('No ScrollGrid implementation');
}
var _a = this, props = _a.props, context = _a.context;
var stickyHeaderDates = !props.forPrint && (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getStickyHeaderDates)(context.options);
var stickyFooterScrollbar = !props.forPrint && (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getStickyFooterScrollbar)(context.options);
var sections = [];
if (headerRowContent) {
sections.push({
type: 'header',
key: 'header',
isSticky: stickyHeaderDates,
chunks: [{
key: 'main',
elRef: this.headerElRef,
tableClassName: 'fc-col-header',
rowContent: headerRowContent,
}],
});
}
sections.push({
type: 'body',
key: 'body',
liquid: true,
chunks: [{
key: 'main',
content: bodyContent,
}],
});
if (stickyFooterScrollbar) {
sections.push({
type: 'footer',
key: 'footer',
isSticky: true,
chunks: [{
key: 'main',
content: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.renderScrollShim,
}],
});
}
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: ['fc-daygrid'].concat(classNames).join(' ') },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections }))); }));
};
return TableView;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function splitSegsByRow(segs, rowCnt) {
var byRow = [];
for (var i = 0; i < rowCnt; i += 1) {
byRow[i] = [];
}
for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {
var seg = segs_1[_i];
byRow[seg.row].push(seg);
}
return byRow;
}
function splitSegsByFirstCol(segs, colCnt) {
var byCol = [];
for (var i = 0; i < colCnt; i += 1) {
byCol[i] = [];
}
for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {
var seg = segs_2[_i];
byCol[seg.firstCol].push(seg);
}
return byCol;
}
function splitInteractionByRow(ui, rowCnt) {
var byRow = [];
if (!ui) {
for (var i = 0; i < rowCnt; i += 1) {
byRow[i] = null;
}
}
else {
for (var i = 0; i < rowCnt; i += 1) {
byRow[i] = {
affectedInstances: ui.affectedInstances,
isEvent: ui.isEvent,
segs: [],
};
}
for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) {
var seg = _a[_i];
byRow[seg.row].segs.push(seg);
}
}
return byRow;
}
var TableCellTop = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableCellTop, _super);
function TableCellTop() {
return _super !== null && _super.apply(this, arguments) || this;
}
TableCellTop.prototype.render = function () {
var props = this.props;
var navLinkAttrs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildNavLinkAttrs)(this.context, props.date);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, defaultContent: renderTopInner }, function (innerElRef, innerContent) { return ((innerContent || props.forceDayTop) && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-day-top", ref: innerElRef },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ id: props.dayNumberId, className: "fc-daygrid-day-number" }, navLinkAttrs), innerContent || (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "\u00A0"))))); }));
};
return TableCellTop;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function renderTopInner(props) {
return props.dayNumberText;
}
var DEFAULT_TABLE_EVENT_TIME_FORMAT = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)({
hour: 'numeric',
minute: '2-digit',
omitZeroMinute: true,
meridiem: 'narrow',
});
function hasListItemDisplay(seg) {
var display = seg.eventRange.ui.display;
return display === 'list-item' || (display === 'auto' &&
!seg.eventRange.def.allDay &&
seg.firstCol === seg.lastCol && // can't be multi-day
seg.isStart && // "
seg.isEnd // "
);
}
var TableBlockEvent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableBlockEvent, _super);
function TableBlockEvent() {
return _super !== null && _super.apply(this, arguments) || this;
}
TableBlockEvent.prototype.render = function () {
var props = this.props;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.StandardEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, props, { extraClassNames: ['fc-daygrid-event', 'fc-daygrid-block-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.seg.eventRange.def.allDay })));
};
return TableBlockEvent;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
var TableListItemEvent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableListItemEvent, _super);
function TableListItemEvent() {
return _super !== null && _super.apply(this, arguments) || this;
}
TableListItemEvent.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var timeFormat = context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT;
var timeText = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildSegTimeText)(props.seg, timeFormat, context, true, props.defaultDisplayEventEnd);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.EventRoot, { seg: props.seg, timeText: timeText, defaultContent: renderInnerContent, isDragging: props.isDragging, isResizing: false, isDateSelecting: false, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent) { return ( // we don't use styles!
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ className: ['fc-daygrid-event', 'fc-daygrid-dot-event'].concat(classNames).join(' '), ref: rootElRef }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegAnchorAttrs)(props.seg, context)), innerContent)); }));
};
return TableListItemEvent;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function renderInnerContent(innerProps) {
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-event-dot", style: { borderColor: innerProps.borderColor || innerProps.backgroundColor } }),
innerProps.timeText && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-time" }, innerProps.timeText)),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-event-title" }, innerProps.event.title || (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "\u00A0"))));
}
var TableCellMoreLink = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableCellMoreLink, _super);
function TableCellMoreLink() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.compileSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(compileSegs);
return _this;
}
TableCellMoreLink.prototype.render = function () {
var props = this.props;
var _a = this.compileSegs(props.singlePlacements), allSegs = _a.allSegs, invisibleSegs = _a.invisibleSegs;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.MoreLinkRoot, { dateProfile: props.dateProfile, todayRange: props.todayRange, allDayDate: props.allDayDate, moreCnt: props.moreCnt, allSegs: allSegs, hiddenSegs: invisibleSegs, alignmentElRef: props.alignmentElRef, alignGridTop: props.alignGridTop, extraDateSpan: props.extraDateSpan, popoverContent: function () {
var isForcedInvisible = (props.eventDrag ? props.eventDrag.affectedInstances : null) ||
(props.eventResize ? props.eventResize.affectedInstances : null) ||
{};
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, allSegs.map(function (seg) {
var instanceId = seg.eventRange.instance.instanceId;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-event-harness", key: instanceId, style: {
visibility: isForcedInvisible[instanceId] ? 'hidden' : '',
} }, hasListItemDisplay(seg) ? ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableListItemEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ seg: seg, isDragging: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, props.todayRange)))) : ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableBlockEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, props.todayRange))))));
})));
} }, function (rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: rootElRef, className: ['fc-daygrid-more-link'].concat(classNames).join(' '), title: title, "aria-expanded": isExpanded, "aria-controls": popoverId }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createAriaClickAttrs)(handleClick)), innerContent)); }));
};
return TableCellMoreLink;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function compileSegs(singlePlacements) {
var allSegs = [];
var invisibleSegs = [];
for (var _i = 0, singlePlacements_1 = singlePlacements; _i < singlePlacements_1.length; _i++) {
var placement = singlePlacements_1[_i];
allSegs.push(placement.seg);
if (!placement.isVisible) {
invisibleSegs.push(placement.seg);
}
}
return { allSegs: allSegs, invisibleSegs: invisibleSegs };
}
var DEFAULT_WEEK_NUM_FORMAT = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)({ week: 'narrow' });
var TableCell = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableCell, _super);
function TableCell() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.rootElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.state = {
dayNumberId: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getUniqueDomId)(),
};
_this.handleRootEl = function (el) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.setRef)(_this.rootElRef, el);
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.setRef)(_this.props.elRef, el);
};
return _this;
}
TableCell.prototype.render = function () {
var _a = this, context = _a.context, props = _a.props, state = _a.state, rootElRef = _a.rootElRef;
var date = props.date, dateProfile = props.dateProfile;
var navLinkAttrs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildNavLinkAttrs)(context, date, 'week');
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayCellRoot, { date: date, dateProfile: dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, elRef: this.handleRootEl }, function (dayElRef, dayClassNames, rootDataAttrs, isDisabled) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: dayElRef, role: "gridcell", className: ['fc-daygrid-day'].concat(dayClassNames, props.extraClassNames || []).join(' ') }, rootDataAttrs, props.extraDataAttrs, (props.showDayNumber ? { 'aria-labelledby': state.dayNumberId } : {})),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-day-frame fc-scrollgrid-sync-inner", ref: props.innerElRef /* different from hook system! RENAME */ },
props.showWeekNumber && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.WeekNumberRoot, { date: date, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function (weekElRef, weekClassNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: weekElRef, className: ['fc-daygrid-week-number'].concat(weekClassNames).join(' ') }, navLinkAttrs), innerContent)); })),
!isDisabled && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableCellTop, { date: date, dateProfile: dateProfile, showDayNumber: props.showDayNumber, dayNumberId: state.dayNumberId, forceDayTop: props.forceDayTop, todayRange: props.todayRange, extraHookProps: props.extraHookProps })),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-day-events", ref: props.fgContentElRef },
props.fgContent,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-day-bottom", style: { marginTop: props.moreMarginTop } },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableCellMoreLink, { allDayDate: date, singlePlacements: props.singlePlacements, moreCnt: props.moreCnt, alignmentElRef: rootElRef, alignGridTop: !props.showDayNumber, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange }))),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-daygrid-day-bg" }, props.bgContent)))); }));
};
return TableCell;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function computeFgSegPlacement(segs, // assumed already sorted
dayMaxEvents, dayMaxEventRows, strictOrder, eventInstanceHeights, maxContentHeight, cells) {
var hierarchy = new DayGridSegHierarchy();
hierarchy.allowReslicing = true;
hierarchy.strictOrder = strictOrder;
if (dayMaxEvents === true || dayMaxEventRows === true) {
hierarchy.maxCoord = maxContentHeight;
hierarchy.hiddenConsumes = true;
}
else if (typeof dayMaxEvents === 'number') {
hierarchy.maxStackCnt = dayMaxEvents;
}
else if (typeof dayMaxEventRows === 'number') {
hierarchy.maxStackCnt = dayMaxEventRows;
hierarchy.hiddenConsumes = true;
}
// create segInputs only for segs with known heights
var segInputs = [];
var unknownHeightSegs = [];
for (var i = 0; i < segs.length; i += 1) {
var seg = segs[i];
var instanceId = seg.eventRange.instance.instanceId;
var eventHeight = eventInstanceHeights[instanceId];
if (eventHeight != null) {
segInputs.push({
index: i,
thickness: eventHeight,
span: {
start: seg.firstCol,
end: seg.lastCol + 1,
},
});
}
else {
unknownHeightSegs.push(seg);
}
}
var hiddenEntries = hierarchy.addSegs(segInputs);
var segRects = hierarchy.toRects();
var _a = placeRects(segRects, segs, cells), singleColPlacements = _a.singleColPlacements, multiColPlacements = _a.multiColPlacements, leftoverMargins = _a.leftoverMargins;
var moreCnts = [];
var moreMarginTops = [];
// add segs with unknown heights
for (var _i = 0, unknownHeightSegs_1 = unknownHeightSegs; _i < unknownHeightSegs_1.length; _i++) {
var seg = unknownHeightSegs_1[_i];
multiColPlacements[seg.firstCol].push({
seg: seg,
isVisible: false,
isAbsolute: true,
absoluteTop: 0,
marginTop: 0,
});
for (var col = seg.firstCol; col <= seg.lastCol; col += 1) {
singleColPlacements[col].push({
seg: resliceSeg(seg, col, col + 1, cells),
isVisible: false,
isAbsolute: false,
absoluteTop: 0,
marginTop: 0,
});
}
}
// add the hidden entries
for (var col = 0; col < cells.length; col += 1) {
moreCnts.push(0);
}
for (var _b = 0, hiddenEntries_1 = hiddenEntries; _b < hiddenEntries_1.length; _b++) {
var hiddenEntry = hiddenEntries_1[_b];
var seg = segs[hiddenEntry.index];
var hiddenSpan = hiddenEntry.span;
multiColPlacements[hiddenSpan.start].push({
seg: resliceSeg(seg, hiddenSpan.start, hiddenSpan.end, cells),
isVisible: false,
isAbsolute: true,
absoluteTop: 0,
marginTop: 0,
});
for (var col = hiddenSpan.start; col < hiddenSpan.end; col += 1) {
moreCnts[col] += 1;
singleColPlacements[col].push({
seg: resliceSeg(seg, col, col + 1, cells),
isVisible: false,
isAbsolute: false,
absoluteTop: 0,
marginTop: 0,
});
}
}
// deal with leftover margins
for (var col = 0; col < cells.length; col += 1) {
moreMarginTops.push(leftoverMargins[col]);
}
return { singleColPlacements: singleColPlacements, multiColPlacements: multiColPlacements, moreCnts: moreCnts, moreMarginTops: moreMarginTops };
}
// rects ordered by top coord, then left
function placeRects(allRects, segs, cells) {
var rectsByEachCol = groupRectsByEachCol(allRects, cells.length);
var singleColPlacements = [];
var multiColPlacements = [];
var leftoverMargins = [];
for (var col = 0; col < cells.length; col += 1) {
var rects = rectsByEachCol[col];
// compute all static segs in singlePlacements
var singlePlacements = [];
var currentHeight = 0;
var currentMarginTop = 0;
for (var _i = 0, rects_1 = rects; _i < rects_1.length; _i++) {
var rect = rects_1[_i];
var seg = segs[rect.index];
singlePlacements.push({
seg: resliceSeg(seg, col, col + 1, cells),
isVisible: true,
isAbsolute: false,
absoluteTop: rect.levelCoord,
marginTop: rect.levelCoord - currentHeight,
});
currentHeight = rect.levelCoord + rect.thickness;
}
// compute mixed static/absolute segs in multiPlacements
var multiPlacements = [];
currentHeight = 0;
currentMarginTop = 0;
for (var _a = 0, rects_2 = rects; _a < rects_2.length; _a++) {
var rect = rects_2[_a];
var seg = segs[rect.index];
var isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?
var isFirstCol = rect.span.start === col;
currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg
currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg
if (isAbsolute) {
currentMarginTop += rect.thickness;
if (isFirstCol) {
multiPlacements.push({
seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),
isVisible: true,
isAbsolute: true,
absoluteTop: rect.levelCoord,
marginTop: 0,
});
}
}
else if (isFirstCol) {
multiPlacements.push({
seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),
isVisible: true,
isAbsolute: false,
absoluteTop: rect.levelCoord,
marginTop: currentMarginTop, // claim the margin
});
currentMarginTop = 0;
}
}
singleColPlacements.push(singlePlacements);
multiColPlacements.push(multiPlacements);
leftoverMargins.push(currentMarginTop);
}
return { singleColPlacements: singleColPlacements, multiColPlacements: multiColPlacements, leftoverMargins: leftoverMargins };
}
function groupRectsByEachCol(rects, colCnt) {
var rectsByEachCol = [];
for (var col = 0; col < colCnt; col += 1) {
rectsByEachCol.push([]);
}
for (var _i = 0, rects_3 = rects; _i < rects_3.length; _i++) {
var rect = rects_3[_i];
for (var col = rect.span.start; col < rect.span.end; col += 1) {
rectsByEachCol[col].push(rect);
}
}
return rectsByEachCol;
}
function resliceSeg(seg, spanStart, spanEnd, cells) {
if (seg.firstCol === spanStart && seg.lastCol === spanEnd - 1) {
return seg;
}
var eventRange = seg.eventRange;
var origRange = eventRange.range;
var slicedRange = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.intersectRanges)(origRange, {
start: cells[spanStart].date,
end: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDays)(cells[spanEnd - 1].date, 1),
});
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, seg), { firstCol: spanStart, lastCol: spanEnd - 1, eventRange: {
def: eventRange.def,
ui: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, eventRange.ui), { durationEditable: false }),
instance: eventRange.instance,
range: slicedRange,
}, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf() });
}
var DayGridSegHierarchy = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayGridSegHierarchy, _super);
function DayGridSegHierarchy() {
var _this = _super !== null && _super.apply(this, arguments) || this;
// config
_this.hiddenConsumes = false;
// allows us to keep hidden entries in the hierarchy so they take up space
_this.forceHidden = {};
return _this;
}
DayGridSegHierarchy.prototype.addSegs = function (segInputs) {
var _this = this;
var hiddenSegs = _super.prototype.addSegs.call(this, segInputs);
var entriesByLevel = this.entriesByLevel;
var excludeHidden = function (entry) { return !_this.forceHidden[(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEntryKey)(entry)]; };
// remove the forced-hidden segs
for (var level = 0; level < entriesByLevel.length; level += 1) {
entriesByLevel[level] = entriesByLevel[level].filter(excludeHidden);
}
return hiddenSegs;
};
DayGridSegHierarchy.prototype.handleInvalidInsertion = function (insertion, entry, hiddenEntries) {
var _a = this, entriesByLevel = _a.entriesByLevel, forceHidden = _a.forceHidden;
var touchingEntry = insertion.touchingEntry, touchingLevel = insertion.touchingLevel, touchingLateral = insertion.touchingLateral;
if (this.hiddenConsumes && touchingEntry) {
var touchingEntryId = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEntryKey)(touchingEntry);
// if not already hidden
if (!forceHidden[touchingEntryId]) {
if (this.allowReslicing) {
var placeholderEntry = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, touchingEntry), { span: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.intersectSpans)(touchingEntry.span, entry.span) });
var placeholderEntryId = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEntryKey)(placeholderEntry);
forceHidden[placeholderEntryId] = true;
entriesByLevel[touchingLevel][touchingLateral] = placeholderEntry; // replace touchingEntry with our placeholder
this.splitEntry(touchingEntry, entry, hiddenEntries); // split up the touchingEntry, reinsert it
}
else {
forceHidden[touchingEntryId] = true;
hiddenEntries.push(touchingEntry);
}
}
}
return _super.prototype.handleInvalidInsertion.call(this, insertion, entry, hiddenEntries);
};
return DayGridSegHierarchy;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.SegHierarchy));
var TableRow = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableRow, _super);
function TableRow() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.cellElRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap(); // the
_this.frameElRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap(); // the fc-daygrid-day-frame
_this.fgElRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap(); // the fc-daygrid-day-events
_this.segHarnessRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap(); // indexed by "instanceId:firstCol"
_this.rootElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.state = {
framePositions: null,
maxContentHeight: null,
eventInstanceHeights: {},
};
return _this;
}
TableRow.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, state = _a.state, context = _a.context;
var options = context.options;
var colCnt = props.cells.length;
var businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt);
var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt);
var highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt);
var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt);
var _b = computeFgSegPlacement((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.sortEventSegs)(props.fgEventSegs, options.eventOrder), props.dayMaxEvents, props.dayMaxEventRows, options.eventOrderStrict, state.eventInstanceHeights, state.maxContentHeight, props.cells), singleColPlacements = _b.singleColPlacements, multiColPlacements = _b.multiColPlacements, moreCnts = _b.moreCnts, moreMarginTops = _b.moreMarginTops;
var isForcedInvisible = // TODO: messy way to compute this
(props.eventDrag && props.eventDrag.affectedInstances) ||
(props.eventResize && props.eventResize.affectedInstances) ||
{};
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { ref: this.rootElRef, role: "row" },
props.renderIntro && props.renderIntro(),
props.cells.map(function (cell, col) {
var normalFgNodes = _this.renderFgSegs(col, props.forPrint ? singleColPlacements[col] : multiColPlacements[col], props.todayRange, isForcedInvisible);
var mirrorFgNodes = _this.renderFgSegs(col, buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements), props.todayRange, {}, Boolean(props.eventDrag), Boolean(props.eventResize), false);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableCell, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), innerElRef: _this.frameElRefs.createRef(cell.key) /* FF problem, but okay to use for left/right. TODO: rename prop */, dateProfile: props.dateProfile, date: cell.date, showDayNumber: props.showDayNumbers, showWeekNumber: props.showWeekNumbers && col === 0, forceDayTop: props.showWeekNumbers /* even displaying weeknum for row, not necessarily day */, todayRange: props.todayRange, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, moreCnt: moreCnts[col], moreMarginTop: moreMarginTops[col], singlePlacements: singleColPlacements[col], fgContentElRef: _this.fgElRefs.createRef(cell.key), fgContent: ( // Fragment scopes the keys
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, normalFgNodes),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, mirrorFgNodes))), bgContent: ( // Fragment scopes the keys
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
_this.renderFillSegs(highlightSegsByCol[col], 'highlight'),
_this.renderFillSegs(businessHoursByCol[col], 'non-business'),
_this.renderFillSegs(bgEventSegsByCol[col], 'bg-event'))) }));
})));
};
TableRow.prototype.componentDidMount = function () {
this.updateSizing(true);
};
TableRow.prototype.componentDidUpdate = function (prevProps, prevState) {
var currentProps = this.props;
this.updateSizing(!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.isPropsEqual)(prevProps, currentProps));
};
TableRow.prototype.getHighlightSegs = function () {
var props = this.props;
if (props.eventDrag && props.eventDrag.segs.length) { // messy check
return props.eventDrag.segs;
}
if (props.eventResize && props.eventResize.segs.length) { // messy check
return props.eventResize.segs;
}
return props.dateSelectionSegs;
};
TableRow.prototype.getMirrorSegs = function () {
var props = this.props;
if (props.eventResize && props.eventResize.segs.length) { // messy check
return props.eventResize.segs;
}
return [];
};
TableRow.prototype.renderFgSegs = function (col, segPlacements, todayRange, isForcedInvisible, isDragging, isResizing, isDateSelecting) {
var context = this.context;
var eventSelection = this.props.eventSelection;
var framePositions = this.state.framePositions;
var defaultDisplayEventEnd = this.props.cells.length === 1; // colCnt === 1
var isMirror = isDragging || isResizing || isDateSelecting;
var nodes = [];
if (framePositions) {
for (var _i = 0, segPlacements_1 = segPlacements; _i < segPlacements_1.length; _i++) {
var placement = segPlacements_1[_i];
var seg = placement.seg;
var instanceId = seg.eventRange.instance.instanceId;
var key = instanceId + ':' + col;
var isVisible = placement.isVisible && !isForcedInvisible[instanceId];
var isAbsolute = placement.isAbsolute;
var left = '';
var right = '';
if (isAbsolute) {
if (context.isRtl) {
right = 0;
left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol];
}
else {
left = 0;
right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol];
}
}
/*
known bug: events that are force to be list-item but span multiple days still take up space in later columns
todo: in print view, for multi-day events, don't display title within non-start/end segs
*/
nodes.push((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: 'fc-daygrid-event-harness' + (isAbsolute ? ' fc-daygrid-event-harness-abs' : ''), key: key, ref: isMirror ? null : this.segHarnessRefs.createRef(key), style: {
visibility: isVisible ? '' : 'hidden',
marginTop: isAbsolute ? '' : placement.marginTop,
top: isAbsolute ? placement.absoluteTop : '',
left: left,
right: right,
} }, hasListItemDisplay(seg) ? ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableListItemEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ seg: seg, isDragging: isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, todayRange)))) : ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableBlockEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, todayRange))))));
}
}
return nodes;
};
TableRow.prototype.renderFillSegs = function (segs, fillType) {
var isRtl = this.context.isRtl;
var todayRange = this.props.todayRange;
var framePositions = this.state.framePositions;
var nodes = [];
if (framePositions) {
for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {
var seg = segs_1[_i];
var leftRightCss = isRtl ? {
right: 0,
left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol],
} : {
left: 0,
right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol],
};
nodes.push((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEventRangeKey)(seg.eventRange), className: "fc-daygrid-bg-harness", style: leftRightCss }, fillType === 'bg-event' ?
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BgEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ seg: seg }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, todayRange))) :
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.renderFill)(fillType)));
}
}
return _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement.apply(void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spreadArray)([_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, {}], nodes));
};
TableRow.prototype.updateSizing = function (isExternalSizingChange) {
var _a = this, props = _a.props, frameElRefs = _a.frameElRefs;
if (!props.forPrint &&
props.clientWidth !== null // positioning ready?
) {
if (isExternalSizingChange) {
var frameEls = props.cells.map(function (cell) { return frameElRefs.currentMap[cell.key]; });
if (frameEls.length) {
var originEl = this.rootElRef.current;
this.setState({
framePositions: new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.PositionCache(originEl, frameEls, true, // isHorizontal
false),
});
}
}
var oldInstanceHeights = this.state.eventInstanceHeights;
var newInstanceHeights = this.queryEventInstanceHeights();
var limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true;
this.setState({
// HACK to prevent oscillations of events being shown/hidden from max-event-rows
// Essentially, once you compute an element's height, never null-out.
// TODO: always display all events, as visibility:hidden?
eventInstanceHeights: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, oldInstanceHeights), newInstanceHeights),
maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null,
});
}
};
TableRow.prototype.queryEventInstanceHeights = function () {
var segElMap = this.segHarnessRefs.currentMap;
var eventInstanceHeights = {};
// get the max height amongst instance segs
for (var key in segElMap) {
var height = Math.round(segElMap[key].getBoundingClientRect().height);
var instanceId = key.split(':')[0]; // deconstruct how renderFgSegs makes the key
eventInstanceHeights[instanceId] = Math.max(eventInstanceHeights[instanceId] || 0, height);
}
return eventInstanceHeights;
};
TableRow.prototype.computeMaxContentHeight = function () {
var firstKey = this.props.cells[0].key;
var cellEl = this.cellElRefs.currentMap[firstKey];
var fcContainerEl = this.fgElRefs.currentMap[firstKey];
return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top;
};
TableRow.prototype.getCellEls = function () {
var elMap = this.cellElRefs.currentMap;
return this.props.cells.map(function (cell) { return elMap[cell.key]; });
};
return TableRow;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
TableRow.addStateEquality({
eventInstanceHeights: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.isPropsEqual,
});
function buildMirrorPlacements(mirrorSegs, colPlacements) {
if (!mirrorSegs.length) {
return [];
}
var topsByInstanceId = buildAbsoluteTopHash(colPlacements); // TODO: cache this at first render?
return mirrorSegs.map(function (seg) { return ({
seg: seg,
isVisible: true,
isAbsolute: true,
absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId],
marginTop: 0,
}); });
}
function buildAbsoluteTopHash(colPlacements) {
var topsByInstanceId = {};
for (var _i = 0, colPlacements_1 = colPlacements; _i < colPlacements_1.length; _i++) {
var placements = colPlacements_1[_i];
for (var _a = 0, placements_1 = placements; _a < placements_1.length; _a++) {
var placement = placements_1[_a];
topsByInstanceId[placement.seg.eventRange.instance.instanceId] = placement.absoluteTop;
}
}
return topsByInstanceId;
}
var Table = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Table, _super);
function Table() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.splitBusinessHourSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByRow);
_this.splitBgEventSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByRow);
_this.splitFgEventSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByRow);
_this.splitDateSelectionSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByRow);
_this.splitEventDrag = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitInteractionByRow);
_this.splitEventResize = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitInteractionByRow);
_this.rowRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap();
_this.handleRootEl = function (rootEl) {
_this.rootEl = rootEl;
if (rootEl) {
_this.context.registerInteractiveComponent(_this, {
el: rootEl,
isHitComboAllowed: _this.props.isHitComboAllowed,
});
}
else {
_this.context.unregisterInteractiveComponent(_this);
}
};
return _this;
}
Table.prototype.render = function () {
var _this = this;
var props = this.props;
var dateProfile = props.dateProfile, dayMaxEventRows = props.dayMaxEventRows, dayMaxEvents = props.dayMaxEvents, expandRows = props.expandRows;
var rowCnt = props.cells.length;
var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt);
var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt);
var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt);
var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt);
var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt);
var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt);
var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true;
// if rows can't expand to fill fixed height, can't do balanced-height event limit
// TODO: best place to normalize these options?
if (limitViaBalanced && !expandRows) {
limitViaBalanced = false;
dayMaxEventRows = null;
dayMaxEvents = null;
}
var classNames = [
'fc-daygrid-body',
limitViaBalanced ? 'fc-daygrid-body-balanced' : 'fc-daygrid-body-unbalanced',
expandRows ? '' : 'fc-daygrid-body-natural', // will height of one row depend on the others?
];
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: classNames.join(' '), ref: this.handleRootEl, style: {
// these props are important to give this wrapper correct dimensions for interactions
// TODO: if we set it here, can we avoid giving to inner tables?
width: props.clientWidth,
minWidth: props.tableMinWidth,
} },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowTimer, { unit: "day" }, function (nowDate, todayRange) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("table", { role: "presentation", className: "fc-scrollgrid-sync-table", style: {
width: props.clientWidth,
minWidth: props.tableMinWidth,
height: expandRows ? props.clientHeight : '',
} },
props.colGroupNode,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tbody", { role: "presentation" }, props.cells.map(function (cells, row) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TableRow, { ref: _this.rowRefs.createRef(row), key: cells.length
? cells[0].date.toISOString() /* best? or put key on cell? or use diff formatter? */
: row // in case there are no cells (like when resource view is loading)
, showDayNumbers: rowCnt > 1, showWeekNumbers: props.showWeekNumbers, todayRange: todayRange, dateProfile: dateProfile, cells: cells, renderIntro: props.renderRowIntro, businessHourSegs: businessHourSegsByRow[row], eventSelection: props.eventSelection, bgEventSegs: bgEventSegsByRow[row].filter(isSegAllDay) /* hack */, fgEventSegs: fgEventSegsByRow[row], dateSelectionSegs: dateSelectionSegsByRow[row], eventDrag: eventDragByRow[row], eventResize: eventResizeByRow[row], dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })); }))))); })));
};
// Hit System
// ----------------------------------------------------------------------------------------------------
Table.prototype.prepareHits = function () {
this.rowPositions = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.PositionCache(this.rootEl, this.rowRefs.collect().map(function (rowObj) { return rowObj.getCellEls()[0]; }), // first cell el in each row. TODO: not optimal
false, true);
this.colPositions = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.PositionCache(this.rootEl, this.rowRefs.currentMap[0].getCellEls(), // cell els in first row
true, // horizontal
false);
};
Table.prototype.queryHit = function (positionLeft, positionTop) {
var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions;
var col = colPositions.leftToIndex(positionLeft);
var row = rowPositions.topToIndex(positionTop);
if (row != null && col != null) {
var cell = this.props.cells[row][col];
return {
dateProfile: this.props.dateProfile,
dateSpan: (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ range: this.getCellRange(row, col), allDay: true }, cell.extraDateSpan),
dayEl: this.getCellEl(row, col),
rect: {
left: colPositions.lefts[col],
right: colPositions.rights[col],
top: rowPositions.tops[row],
bottom: rowPositions.bottoms[row],
},
layer: 0,
};
}
return null;
};
Table.prototype.getCellEl = function (row, col) {
return this.rowRefs.currentMap[row].getCellEls()[col]; // TODO: not optimal
};
Table.prototype.getCellRange = function (row, col) {
var start = this.props.cells[row][col].date;
var end = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDays)(start, 1);
return { start: start, end: end };
};
return Table;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function isSegAllDay(seg) {
return seg.eventRange.def.allDay;
}
var DayTableSlicer = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayTableSlicer, _super);
function DayTableSlicer() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.forceDayIfListItem = true;
return _this;
}
DayTableSlicer.prototype.sliceRange = function (dateRange, dayTableModel) {
return dayTableModel.sliceRange(dateRange);
};
return DayTableSlicer;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Slicer));
var DayTable = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayTable, _super);
function DayTable() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.slicer = new DayTableSlicer();
_this.tableRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
DayTable.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(Table, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ ref: this.tableRef }, this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel), { dateProfile: props.dateProfile, cells: props.dayTableModel.cells, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })));
};
return DayTable;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
var DayTableView = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(DayTableView, _super);
function DayTableView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildDayTableModel = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(buildDayTableModel);
_this.headerRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.tableRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
DayTableView.prototype.render = function () {
var _this = this;
var _a = this.context, options = _a.options, dateProfileGenerator = _a.dateProfileGenerator;
var props = this.props;
var dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator);
var headerContent = options.dayHeaders && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }));
var bodyContent = function (contentArg) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(DayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, dayTableModel: dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); };
return options.dayMinWidth
? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)
: this.renderSimpleLayout(headerContent, bodyContent);
};
return DayTableView;
}(TableView));
function buildDayTableModel(dateProfile, dateProfileGenerator) {
var daySeries = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);
return new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));
}
var TableDateProfileGenerator = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(TableDateProfileGenerator, _super);
function TableDateProfileGenerator() {
return _super !== null && _super.apply(this, arguments) || this;
}
// Computes the date range that will be rendered.
TableDateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {
var dateEnv = this.props.dateEnv;
var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay);
var start = renderRange.start;
var end = renderRange.end;
var endOfWeek;
// year and month views should be aligned with weeks. this is already done for week
if (/^(year|month)$/.test(currentRangeUnit)) {
start = dateEnv.startOfWeek(start);
// make end-of-week if not already
endOfWeek = dateEnv.startOfWeek(end);
if (endOfWeek.valueOf() !== end.valueOf()) {
end = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addWeeks)(endOfWeek, 1);
}
}
// ensure 6 weeks
if (this.props.monthMode &&
this.props.fixedWeekCount) {
var rowCnt = Math.ceil(// could be partial weeks due to hiddenDays
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.diffWeeks)(start, end));
end = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addWeeks)(end, 6 - rowCnt);
}
return { start: start, end: end };
};
return TableDateProfileGenerator;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateProfileGenerator));
var main = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createPlugin)({
initialView: 'dayGridMonth',
views: {
dayGrid: {
component: DayTableView,
dateProfileGeneratorClass: TableDateProfileGenerator,
},
dayGridDay: {
type: 'dayGrid',
duration: { days: 1 },
},
dayGridWeek: {
type: 'dayGrid',
duration: { weeks: 1 },
},
dayGridMonth: {
type: 'dayGrid',
duration: { months: 1 },
monthMode: true,
fixedWeekCount: true,
},
},
});
/* harmony default export */ __webpack_exports__["default"] = (main);
//# sourceMappingURL=main.js.map
/***/ }),
/***/ "./node_modules/@fullcalendar/interaction/main.js":
/*!********************************************************!*\
!*** ./node_modules/@fullcalendar/interaction/main.js ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Draggable": function() { return /* binding */ ExternalDraggable; },
/* harmony export */ "FeaturefulElementDragging": function() { return /* binding */ FeaturefulElementDragging; },
/* harmony export */ "PointerDragging": function() { return /* binding */ PointerDragging; },
/* harmony export */ "ThirdPartyDraggable": function() { return /* binding */ ThirdPartyDraggable; }
/* harmony export */ });
/* harmony import */ var _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @fullcalendar/common */ "./node_modules/@fullcalendar/common/main.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/*!
FullCalendar v5.10.2
Docs & License: https://fullcalendar.io/
(c) 2021 Adam Shaw
*/
_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.config.touchMouseIgnoreWait = 500;
var ignoreMouseDepth = 0;
var listenerCnt = 0;
var isWindowTouchMoveCancelled = false;
/*
Uses a "pointer" abstraction, which monitors UI events for both mouse and touch.
Tracks when the pointer "drags" on a certain element, meaning down+move+up.
Also, tracks if there was touch-scrolling.
Also, can prevent touch-scrolling from happening.
Also, can fire pointermove events when scrolling happens underneath, even when no real pointer movement.
emits:
- pointerdown
- pointermove
- pointerup
*/
var PointerDragging = /** @class */ (function () {
function PointerDragging(containerEl) {
var _this = this;
this.subjectEl = null;
// options that can be directly assigned by caller
this.selector = ''; // will cause subjectEl in all emitted events to be this element
this.handleSelector = '';
this.shouldIgnoreMove = false;
this.shouldWatchScroll = true; // for simulating pointermove on scroll
// internal states
this.isDragging = false;
this.isTouchDragging = false;
this.wasTouchScroll = false;
// Mouse
// ----------------------------------------------------------------------------------------------------
this.handleMouseDown = function (ev) {
if (!_this.shouldIgnoreMouse() &&
isPrimaryMouseButton(ev) &&
_this.tryStart(ev)) {
var pev = _this.createEventFromMouse(ev, true);
_this.emitter.trigger('pointerdown', pev);
_this.initScrollWatch(pev);
if (!_this.shouldIgnoreMove) {
document.addEventListener('mousemove', _this.handleMouseMove);
}
document.addEventListener('mouseup', _this.handleMouseUp);
}
};
this.handleMouseMove = function (ev) {
var pev = _this.createEventFromMouse(ev);
_this.recordCoords(pev);
_this.emitter.trigger('pointermove', pev);
};
this.handleMouseUp = function (ev) {
document.removeEventListener('mousemove', _this.handleMouseMove);
document.removeEventListener('mouseup', _this.handleMouseUp);
_this.emitter.trigger('pointerup', _this.createEventFromMouse(ev));
_this.cleanup(); // call last so that pointerup has access to props
};
// Touch
// ----------------------------------------------------------------------------------------------------
this.handleTouchStart = function (ev) {
if (_this.tryStart(ev)) {
_this.isTouchDragging = true;
var pev = _this.createEventFromTouch(ev, true);
_this.emitter.trigger('pointerdown', pev);
_this.initScrollWatch(pev);
// unlike mouse, need to attach to target, not document
// https://stackoverflow.com/a/45760014
var targetEl = ev.target;
if (!_this.shouldIgnoreMove) {
targetEl.addEventListener('touchmove', _this.handleTouchMove);
}
targetEl.addEventListener('touchend', _this.handleTouchEnd);
targetEl.addEventListener('touchcancel', _this.handleTouchEnd); // treat it as a touch end
// attach a handler to get called when ANY scroll action happens on the page.
// this was impossible to do with normal on/off because 'scroll' doesn't bubble.
// http://stackoverflow.com/a/32954565/96342
window.addEventListener('scroll', _this.handleTouchScroll, true);
}
};
this.handleTouchMove = function (ev) {
var pev = _this.createEventFromTouch(ev);
_this.recordCoords(pev);
_this.emitter.trigger('pointermove', pev);
};
this.handleTouchEnd = function (ev) {
if (_this.isDragging) { // done to guard against touchend followed by touchcancel
var targetEl = ev.target;
targetEl.removeEventListener('touchmove', _this.handleTouchMove);
targetEl.removeEventListener('touchend', _this.handleTouchEnd);
targetEl.removeEventListener('touchcancel', _this.handleTouchEnd);
window.removeEventListener('scroll', _this.handleTouchScroll, true); // useCaptured=true
_this.emitter.trigger('pointerup', _this.createEventFromTouch(ev));
_this.cleanup(); // call last so that pointerup has access to props
_this.isTouchDragging = false;
startIgnoringMouse();
}
};
this.handleTouchScroll = function () {
_this.wasTouchScroll = true;
};
this.handleScroll = function (ev) {
if (!_this.shouldIgnoreMove) {
var pageX = (window.pageXOffset - _this.prevScrollX) + _this.prevPageX;
var pageY = (window.pageYOffset - _this.prevScrollY) + _this.prevPageY;
_this.emitter.trigger('pointermove', {
origEvent: ev,
isTouch: _this.isTouchDragging,
subjectEl: _this.subjectEl,
pageX: pageX,
pageY: pageY,
deltaX: pageX - _this.origPageX,
deltaY: pageY - _this.origPageY,
});
}
};
this.containerEl = containerEl;
this.emitter = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.Emitter();
containerEl.addEventListener('mousedown', this.handleMouseDown);
containerEl.addEventListener('touchstart', this.handleTouchStart, { passive: true });
listenerCreated();
}
PointerDragging.prototype.destroy = function () {
this.containerEl.removeEventListener('mousedown', this.handleMouseDown);
this.containerEl.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
listenerDestroyed();
};
PointerDragging.prototype.tryStart = function (ev) {
var subjectEl = this.querySubjectEl(ev);
var downEl = ev.target;
if (subjectEl &&
(!this.handleSelector || (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(downEl, this.handleSelector))) {
this.subjectEl = subjectEl;
this.isDragging = true; // do this first so cancelTouchScroll will work
this.wasTouchScroll = false;
return true;
}
return false;
};
PointerDragging.prototype.cleanup = function () {
isWindowTouchMoveCancelled = false;
this.isDragging = false;
this.subjectEl = null;
// keep wasTouchScroll around for later access
this.destroyScrollWatch();
};
PointerDragging.prototype.querySubjectEl = function (ev) {
if (this.selector) {
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(ev.target, this.selector);
}
return this.containerEl;
};
PointerDragging.prototype.shouldIgnoreMouse = function () {
return ignoreMouseDepth || this.isTouchDragging;
};
// can be called by user of this class, to cancel touch-based scrolling for the current drag
PointerDragging.prototype.cancelTouchScroll = function () {
if (this.isDragging) {
isWindowTouchMoveCancelled = true;
}
};
// Scrolling that simulates pointermoves
// ----------------------------------------------------------------------------------------------------
PointerDragging.prototype.initScrollWatch = function (ev) {
if (this.shouldWatchScroll) {
this.recordCoords(ev);
window.addEventListener('scroll', this.handleScroll, true); // useCapture=true
}
};
PointerDragging.prototype.recordCoords = function (ev) {
if (this.shouldWatchScroll) {
this.prevPageX = ev.pageX;
this.prevPageY = ev.pageY;
this.prevScrollX = window.pageXOffset;
this.prevScrollY = window.pageYOffset;
}
};
PointerDragging.prototype.destroyScrollWatch = function () {
if (this.shouldWatchScroll) {
window.removeEventListener('scroll', this.handleScroll, true); // useCaptured=true
}
};
// Event Normalization
// ----------------------------------------------------------------------------------------------------
PointerDragging.prototype.createEventFromMouse = function (ev, isFirst) {
var deltaX = 0;
var deltaY = 0;
// TODO: repeat code
if (isFirst) {
this.origPageX = ev.pageX;
this.origPageY = ev.pageY;
}
else {
deltaX = ev.pageX - this.origPageX;
deltaY = ev.pageY - this.origPageY;
}
return {
origEvent: ev,
isTouch: false,
subjectEl: this.subjectEl,
pageX: ev.pageX,
pageY: ev.pageY,
deltaX: deltaX,
deltaY: deltaY,
};
};
PointerDragging.prototype.createEventFromTouch = function (ev, isFirst) {
var touches = ev.touches;
var pageX;
var pageY;
var deltaX = 0;
var deltaY = 0;
// if touch coords available, prefer,
// because FF would give bad ev.pageX ev.pageY
if (touches && touches.length) {
pageX = touches[0].pageX;
pageY = touches[0].pageY;
}
else {
pageX = ev.pageX;
pageY = ev.pageY;
}
// TODO: repeat code
if (isFirst) {
this.origPageX = pageX;
this.origPageY = pageY;
}
else {
deltaX = pageX - this.origPageX;
deltaY = pageY - this.origPageY;
}
return {
origEvent: ev,
isTouch: true,
subjectEl: this.subjectEl,
pageX: pageX,
pageY: pageY,
deltaX: deltaX,
deltaY: deltaY,
};
};
return PointerDragging;
}());
// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)
function isPrimaryMouseButton(ev) {
return ev.button === 0 && !ev.ctrlKey;
}
// Ignoring fake mouse events generated by touch
// ----------------------------------------------------------------------------------------------------
function startIgnoringMouse() {
ignoreMouseDepth += 1;
setTimeout(function () {
ignoreMouseDepth -= 1;
}, _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.config.touchMouseIgnoreWait);
}
// We want to attach touchmove as early as possible for Safari
// ----------------------------------------------------------------------------------------------------
function listenerCreated() {
listenerCnt += 1;
if (listenerCnt === 1) {
window.addEventListener('touchmove', onWindowTouchMove, { passive: false });
}
}
function listenerDestroyed() {
listenerCnt -= 1;
if (!listenerCnt) {
window.removeEventListener('touchmove', onWindowTouchMove, { passive: false });
}
}
function onWindowTouchMove(ev) {
if (isWindowTouchMoveCancelled) {
ev.preventDefault();
}
}
/*
An effect in which an element follows the movement of a pointer across the screen.
The moving element is a clone of some other element.
Must call start + handleMove + stop.
*/
var ElementMirror = /** @class */ (function () {
function ElementMirror() {
this.isVisible = false; // must be explicitly enabled
this.sourceEl = null;
this.mirrorEl = null;
this.sourceElRect = null; // screen coords relative to viewport
// options that can be set directly by caller
this.parentNode = document.body; // HIGHLY SUGGESTED to set this to sidestep ShadowDOM issues
this.zIndex = 9999;
this.revertDuration = 0;
}
ElementMirror.prototype.start = function (sourceEl, pageX, pageY) {
this.sourceEl = sourceEl;
this.sourceElRect = this.sourceEl.getBoundingClientRect();
this.origScreenX = pageX - window.pageXOffset;
this.origScreenY = pageY - window.pageYOffset;
this.deltaX = 0;
this.deltaY = 0;
this.updateElPosition();
};
ElementMirror.prototype.handleMove = function (pageX, pageY) {
this.deltaX = (pageX - window.pageXOffset) - this.origScreenX;
this.deltaY = (pageY - window.pageYOffset) - this.origScreenY;
this.updateElPosition();
};
// can be called before start
ElementMirror.prototype.setIsVisible = function (bool) {
if (bool) {
if (!this.isVisible) {
if (this.mirrorEl) {
this.mirrorEl.style.display = '';
}
this.isVisible = bool; // needs to happen before updateElPosition
this.updateElPosition(); // because was not updating the position while invisible
}
}
else if (this.isVisible) {
if (this.mirrorEl) {
this.mirrorEl.style.display = 'none';
}
this.isVisible = bool;
}
};
// always async
ElementMirror.prototype.stop = function (needsRevertAnimation, callback) {
var _this = this;
var done = function () {
_this.cleanup();
callback();
};
if (needsRevertAnimation &&
this.mirrorEl &&
this.isVisible &&
this.revertDuration && // if 0, transition won't work
(this.deltaX || this.deltaY) // if same coords, transition won't work
) {
this.doRevertAnimation(done, this.revertDuration);
}
else {
setTimeout(done, 0);
}
};
ElementMirror.prototype.doRevertAnimation = function (callback, revertDuration) {
var mirrorEl = this.mirrorEl;
var finalSourceElRect = this.sourceEl.getBoundingClientRect(); // because autoscrolling might have happened
mirrorEl.style.transition =
'top ' + revertDuration + 'ms,' +
'left ' + revertDuration + 'ms';
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.applyStyle)(mirrorEl, {
left: finalSourceElRect.left,
top: finalSourceElRect.top,
});
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.whenTransitionDone)(mirrorEl, function () {
mirrorEl.style.transition = '';
callback();
});
};
ElementMirror.prototype.cleanup = function () {
if (this.mirrorEl) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.removeElement)(this.mirrorEl);
this.mirrorEl = null;
}
this.sourceEl = null;
};
ElementMirror.prototype.updateElPosition = function () {
if (this.sourceEl && this.isVisible) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.applyStyle)(this.getMirrorEl(), {
left: this.sourceElRect.left + this.deltaX,
top: this.sourceElRect.top + this.deltaY,
});
}
};
ElementMirror.prototype.getMirrorEl = function () {
var sourceElRect = this.sourceElRect;
var mirrorEl = this.mirrorEl;
if (!mirrorEl) {
mirrorEl = this.mirrorEl = this.sourceEl.cloneNode(true); // cloneChildren=true
// we don't want long taps or any mouse interaction causing selection/menus.
// would use preventSelection(), but that prevents selectstart, causing problems.
mirrorEl.classList.add('fc-unselectable');
mirrorEl.classList.add('fc-event-dragging');
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.applyStyle)(mirrorEl, {
position: 'fixed',
zIndex: this.zIndex,
visibility: '',
boxSizing: 'border-box',
width: sourceElRect.right - sourceElRect.left,
height: sourceElRect.bottom - sourceElRect.top,
right: 'auto',
bottom: 'auto',
margin: 0,
});
this.parentNode.appendChild(mirrorEl);
}
return mirrorEl;
};
return ElementMirror;
}());
/*
Is a cache for a given element's scroll information (all the info that ScrollController stores)
in addition the "client rectangle" of the element.. the area within the scrollbars.
The cache can be in one of two modes:
- doesListening:false - ignores when the container is scrolled by someone else
- doesListening:true - watch for scrolling and update the cache
*/
var ScrollGeomCache = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(ScrollGeomCache, _super);
function ScrollGeomCache(scrollController, doesListening) {
var _this = _super.call(this) || this;
_this.handleScroll = function () {
_this.scrollTop = _this.scrollController.getScrollTop();
_this.scrollLeft = _this.scrollController.getScrollLeft();
_this.handleScrollChange();
};
_this.scrollController = scrollController;
_this.doesListening = doesListening;
_this.scrollTop = _this.origScrollTop = scrollController.getScrollTop();
_this.scrollLeft = _this.origScrollLeft = scrollController.getScrollLeft();
_this.scrollWidth = scrollController.getScrollWidth();
_this.scrollHeight = scrollController.getScrollHeight();
_this.clientWidth = scrollController.getClientWidth();
_this.clientHeight = scrollController.getClientHeight();
_this.clientRect = _this.computeClientRect(); // do last in case it needs cached values
if (_this.doesListening) {
_this.getEventTarget().addEventListener('scroll', _this.handleScroll);
}
return _this;
}
ScrollGeomCache.prototype.destroy = function () {
if (this.doesListening) {
this.getEventTarget().removeEventListener('scroll', this.handleScroll);
}
};
ScrollGeomCache.prototype.getScrollTop = function () {
return this.scrollTop;
};
ScrollGeomCache.prototype.getScrollLeft = function () {
return this.scrollLeft;
};
ScrollGeomCache.prototype.setScrollTop = function (top) {
this.scrollController.setScrollTop(top);
if (!this.doesListening) {
// we are not relying on the element to normalize out-of-bounds scroll values
// so we need to sanitize ourselves
this.scrollTop = Math.max(Math.min(top, this.getMaxScrollTop()), 0);
this.handleScrollChange();
}
};
ScrollGeomCache.prototype.setScrollLeft = function (top) {
this.scrollController.setScrollLeft(top);
if (!this.doesListening) {
// we are not relying on the element to normalize out-of-bounds scroll values
// so we need to sanitize ourselves
this.scrollLeft = Math.max(Math.min(top, this.getMaxScrollLeft()), 0);
this.handleScrollChange();
}
};
ScrollGeomCache.prototype.getClientWidth = function () {
return this.clientWidth;
};
ScrollGeomCache.prototype.getClientHeight = function () {
return this.clientHeight;
};
ScrollGeomCache.prototype.getScrollWidth = function () {
return this.scrollWidth;
};
ScrollGeomCache.prototype.getScrollHeight = function () {
return this.scrollHeight;
};
ScrollGeomCache.prototype.handleScrollChange = function () {
};
return ScrollGeomCache;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.ScrollController));
var ElementScrollGeomCache = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(ElementScrollGeomCache, _super);
function ElementScrollGeomCache(el, doesListening) {
return _super.call(this, new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.ElementScrollController(el), doesListening) || this;
}
ElementScrollGeomCache.prototype.getEventTarget = function () {
return this.scrollController.el;
};
ElementScrollGeomCache.prototype.computeClientRect = function () {
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.computeInnerRect)(this.scrollController.el);
};
return ElementScrollGeomCache;
}(ScrollGeomCache));
var WindowScrollGeomCache = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(WindowScrollGeomCache, _super);
function WindowScrollGeomCache(doesListening) {
return _super.call(this, new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.WindowScrollController(), doesListening) || this;
}
WindowScrollGeomCache.prototype.getEventTarget = function () {
return window;
};
WindowScrollGeomCache.prototype.computeClientRect = function () {
return {
left: this.scrollLeft,
right: this.scrollLeft + this.clientWidth,
top: this.scrollTop,
bottom: this.scrollTop + this.clientHeight,
};
};
// the window is the only scroll object that changes it's rectangle relative
// to the document's topleft as it scrolls
WindowScrollGeomCache.prototype.handleScrollChange = function () {
this.clientRect = this.computeClientRect();
};
return WindowScrollGeomCache;
}(ScrollGeomCache));
// If available we are using native "performance" API instead of "Date"
// Read more about it on MDN:
// https://developer.mozilla.org/en-US/docs/Web/API/Performance
var getTime = typeof performance === 'function' ? performance.now : Date.now;
/*
For a pointer interaction, automatically scrolls certain scroll containers when the pointer
approaches the edge.
The caller must call start + handleMove + stop.
*/
var AutoScroller = /** @class */ (function () {
function AutoScroller() {
var _this = this;
// options that can be set by caller
this.isEnabled = true;
this.scrollQuery = [window, '.fc-scroller'];
this.edgeThreshold = 50; // pixels
this.maxVelocity = 300; // pixels per second
// internal state
this.pointerScreenX = null;
this.pointerScreenY = null;
this.isAnimating = false;
this.scrollCaches = null;
// protect against the initial pointerdown being too close to an edge and starting the scroll
this.everMovedUp = false;
this.everMovedDown = false;
this.everMovedLeft = false;
this.everMovedRight = false;
this.animate = function () {
if (_this.isAnimating) { // wasn't cancelled between animation calls
var edge = _this.computeBestEdge(_this.pointerScreenX + window.pageXOffset, _this.pointerScreenY + window.pageYOffset);
if (edge) {
var now = getTime();
_this.handleSide(edge, (now - _this.msSinceRequest) / 1000);
_this.requestAnimation(now);
}
else {
_this.isAnimating = false; // will stop animation
}
}
};
}
AutoScroller.prototype.start = function (pageX, pageY, scrollStartEl) {
if (this.isEnabled) {
this.scrollCaches = this.buildCaches(scrollStartEl);
this.pointerScreenX = null;
this.pointerScreenY = null;
this.everMovedUp = false;
this.everMovedDown = false;
this.everMovedLeft = false;
this.everMovedRight = false;
this.handleMove(pageX, pageY);
}
};
AutoScroller.prototype.handleMove = function (pageX, pageY) {
if (this.isEnabled) {
var pointerScreenX = pageX - window.pageXOffset;
var pointerScreenY = pageY - window.pageYOffset;
var yDelta = this.pointerScreenY === null ? 0 : pointerScreenY - this.pointerScreenY;
var xDelta = this.pointerScreenX === null ? 0 : pointerScreenX - this.pointerScreenX;
if (yDelta < 0) {
this.everMovedUp = true;
}
else if (yDelta > 0) {
this.everMovedDown = true;
}
if (xDelta < 0) {
this.everMovedLeft = true;
}
else if (xDelta > 0) {
this.everMovedRight = true;
}
this.pointerScreenX = pointerScreenX;
this.pointerScreenY = pointerScreenY;
if (!this.isAnimating) {
this.isAnimating = true;
this.requestAnimation(getTime());
}
}
};
AutoScroller.prototype.stop = function () {
if (this.isEnabled) {
this.isAnimating = false; // will stop animation
for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {
var scrollCache = _a[_i];
scrollCache.destroy();
}
this.scrollCaches = null;
}
};
AutoScroller.prototype.requestAnimation = function (now) {
this.msSinceRequest = now;
requestAnimationFrame(this.animate);
};
AutoScroller.prototype.handleSide = function (edge, seconds) {
var scrollCache = edge.scrollCache;
var edgeThreshold = this.edgeThreshold;
var invDistance = edgeThreshold - edge.distance;
var velocity = // the closer to the edge, the faster we scroll
((invDistance * invDistance) / (edgeThreshold * edgeThreshold)) * // quadratic
this.maxVelocity * seconds;
var sign = 1;
switch (edge.name) {
case 'left':
sign = -1;
// falls through
case 'right':
scrollCache.setScrollLeft(scrollCache.getScrollLeft() + velocity * sign);
break;
case 'top':
sign = -1;
// falls through
case 'bottom':
scrollCache.setScrollTop(scrollCache.getScrollTop() + velocity * sign);
break;
}
};
// left/top are relative to document topleft
AutoScroller.prototype.computeBestEdge = function (left, top) {
var edgeThreshold = this.edgeThreshold;
var bestSide = null;
var scrollCaches = this.scrollCaches || [];
for (var _i = 0, scrollCaches_1 = scrollCaches; _i < scrollCaches_1.length; _i++) {
var scrollCache = scrollCaches_1[_i];
var rect = scrollCache.clientRect;
var leftDist = left - rect.left;
var rightDist = rect.right - left;
var topDist = top - rect.top;
var bottomDist = rect.bottom - top;
// completely within the rect?
if (leftDist >= 0 && rightDist >= 0 && topDist >= 0 && bottomDist >= 0) {
if (topDist <= edgeThreshold && this.everMovedUp && scrollCache.canScrollUp() &&
(!bestSide || bestSide.distance > topDist)) {
bestSide = { scrollCache: scrollCache, name: 'top', distance: topDist };
}
if (bottomDist <= edgeThreshold && this.everMovedDown && scrollCache.canScrollDown() &&
(!bestSide || bestSide.distance > bottomDist)) {
bestSide = { scrollCache: scrollCache, name: 'bottom', distance: bottomDist };
}
if (leftDist <= edgeThreshold && this.everMovedLeft && scrollCache.canScrollLeft() &&
(!bestSide || bestSide.distance > leftDist)) {
bestSide = { scrollCache: scrollCache, name: 'left', distance: leftDist };
}
if (rightDist <= edgeThreshold && this.everMovedRight && scrollCache.canScrollRight() &&
(!bestSide || bestSide.distance > rightDist)) {
bestSide = { scrollCache: scrollCache, name: 'right', distance: rightDist };
}
}
}
return bestSide;
};
AutoScroller.prototype.buildCaches = function (scrollStartEl) {
return this.queryScrollEls(scrollStartEl).map(function (el) {
if (el === window) {
return new WindowScrollGeomCache(false); // false = don't listen to user-generated scrolls
}
return new ElementScrollGeomCache(el, false); // false = don't listen to user-generated scrolls
});
};
AutoScroller.prototype.queryScrollEls = function (scrollStartEl) {
var els = [];
for (var _i = 0, _a = this.scrollQuery; _i < _a.length; _i++) {
var query = _a[_i];
if (typeof query === 'object') {
els.push(query);
}
else {
els.push.apply(els, Array.prototype.slice.call((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getElRoot)(scrollStartEl).querySelectorAll(query)));
}
}
return els;
};
return AutoScroller;
}());
/*
Monitors dragging on an element. Has a number of high-level features:
- minimum distance required before dragging
- minimum wait time ("delay") before dragging
- a mirror element that follows the pointer
*/
var FeaturefulElementDragging = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(FeaturefulElementDragging, _super);
function FeaturefulElementDragging(containerEl, selector) {
var _this = _super.call(this, containerEl) || this;
_this.containerEl = containerEl;
// options that can be directly set by caller
// the caller can also set the PointerDragging's options as well
_this.delay = null;
_this.minDistance = 0;
_this.touchScrollAllowed = true; // prevents drag from starting and blocks scrolling during drag
_this.mirrorNeedsRevert = false;
_this.isInteracting = false; // is the user validly moving the pointer? lasts until pointerup
_this.isDragging = false; // is it INTENTFULLY dragging? lasts until after revert animation
_this.isDelayEnded = false;
_this.isDistanceSurpassed = false;
_this.delayTimeoutId = null;
_this.onPointerDown = function (ev) {
if (!_this.isDragging) { // so new drag doesn't happen while revert animation is going
_this.isInteracting = true;
_this.isDelayEnded = false;
_this.isDistanceSurpassed = false;
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.preventSelection)(document.body);
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.preventContextMenu)(document.body);
// prevent links from being visited if there's an eventual drag.
// also prevents selection in older browsers (maybe?).
// not necessary for touch, besides, browser would complain about passiveness.
if (!ev.isTouch) {
ev.origEvent.preventDefault();
}
_this.emitter.trigger('pointerdown', ev);
if (_this.isInteracting && // not destroyed via pointerdown handler
!_this.pointer.shouldIgnoreMove) {
// actions related to initiating dragstart+dragmove+dragend...
_this.mirror.setIsVisible(false); // reset. caller must set-visible
_this.mirror.start(ev.subjectEl, ev.pageX, ev.pageY); // must happen on first pointer down
_this.startDelay(ev);
if (!_this.minDistance) {
_this.handleDistanceSurpassed(ev);
}
}
}
};
_this.onPointerMove = function (ev) {
if (_this.isInteracting) {
_this.emitter.trigger('pointermove', ev);
if (!_this.isDistanceSurpassed) {
var minDistance = _this.minDistance;
var distanceSq = void 0; // current distance from the origin, squared
var deltaX = ev.deltaX, deltaY = ev.deltaY;
distanceSq = deltaX * deltaX + deltaY * deltaY;
if (distanceSq >= minDistance * minDistance) { // use pythagorean theorem
_this.handleDistanceSurpassed(ev);
}
}
if (_this.isDragging) {
// a real pointer move? (not one simulated by scrolling)
if (ev.origEvent.type !== 'scroll') {
_this.mirror.handleMove(ev.pageX, ev.pageY);
_this.autoScroller.handleMove(ev.pageX, ev.pageY);
}
_this.emitter.trigger('dragmove', ev);
}
}
};
_this.onPointerUp = function (ev) {
if (_this.isInteracting) {
_this.isInteracting = false;
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.allowSelection)(document.body);
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.allowContextMenu)(document.body);
_this.emitter.trigger('pointerup', ev); // can potentially set mirrorNeedsRevert
if (_this.isDragging) {
_this.autoScroller.stop();
_this.tryStopDrag(ev); // which will stop the mirror
}
if (_this.delayTimeoutId) {
clearTimeout(_this.delayTimeoutId);
_this.delayTimeoutId = null;
}
}
};
var pointer = _this.pointer = new PointerDragging(containerEl);
pointer.emitter.on('pointerdown', _this.onPointerDown);
pointer.emitter.on('pointermove', _this.onPointerMove);
pointer.emitter.on('pointerup', _this.onPointerUp);
if (selector) {
pointer.selector = selector;
}
_this.mirror = new ElementMirror();
_this.autoScroller = new AutoScroller();
return _this;
}
FeaturefulElementDragging.prototype.destroy = function () {
this.pointer.destroy();
// HACK: simulate a pointer-up to end the current drag
// TODO: fire 'dragend' directly and stop interaction. discourage use of pointerup event (b/c might not fire)
this.onPointerUp({});
};
FeaturefulElementDragging.prototype.startDelay = function (ev) {
var _this = this;
if (typeof this.delay === 'number') {
this.delayTimeoutId = setTimeout(function () {
_this.delayTimeoutId = null;
_this.handleDelayEnd(ev);
}, this.delay); // not assignable to number!
}
else {
this.handleDelayEnd(ev);
}
};
FeaturefulElementDragging.prototype.handleDelayEnd = function (ev) {
this.isDelayEnded = true;
this.tryStartDrag(ev);
};
FeaturefulElementDragging.prototype.handleDistanceSurpassed = function (ev) {
this.isDistanceSurpassed = true;
this.tryStartDrag(ev);
};
FeaturefulElementDragging.prototype.tryStartDrag = function (ev) {
if (this.isDelayEnded && this.isDistanceSurpassed) {
if (!this.pointer.wasTouchScroll || this.touchScrollAllowed) {
this.isDragging = true;
this.mirrorNeedsRevert = false;
this.autoScroller.start(ev.pageX, ev.pageY, this.containerEl);
this.emitter.trigger('dragstart', ev);
if (this.touchScrollAllowed === false) {
this.pointer.cancelTouchScroll();
}
}
}
};
FeaturefulElementDragging.prototype.tryStopDrag = function (ev) {
// .stop() is ALWAYS asynchronous, which we NEED because we want all pointerup events
// that come from the document to fire beforehand. much more convenient this way.
this.mirror.stop(this.mirrorNeedsRevert, this.stopDrag.bind(this, ev));
};
FeaturefulElementDragging.prototype.stopDrag = function (ev) {
this.isDragging = false;
this.emitter.trigger('dragend', ev);
};
// fill in the implementations...
FeaturefulElementDragging.prototype.setIgnoreMove = function (bool) {
this.pointer.shouldIgnoreMove = bool;
};
FeaturefulElementDragging.prototype.setMirrorIsVisible = function (bool) {
this.mirror.setIsVisible(bool);
};
FeaturefulElementDragging.prototype.setMirrorNeedsRevert = function (bool) {
this.mirrorNeedsRevert = bool;
};
FeaturefulElementDragging.prototype.setAutoScrollEnabled = function (bool) {
this.autoScroller.isEnabled = bool;
};
return FeaturefulElementDragging;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.ElementDragging));
/*
When this class is instantiated, it records the offset of an element (relative to the document topleft),
and continues to monitor scrolling, updating the cached coordinates if it needs to.
Does not access the DOM after instantiation, so highly performant.
Also keeps track of all scrolling/overflow:hidden containers that are parents of the given element
and an determine if a given point is inside the combined clipping rectangle.
*/
var OffsetTracker = /** @class */ (function () {
function OffsetTracker(el) {
this.origRect = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.computeRect)(el);
// will work fine for divs that have overflow:hidden
this.scrollCaches = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getClippingParents)(el).map(function (scrollEl) { return new ElementScrollGeomCache(scrollEl, true); });
}
OffsetTracker.prototype.destroy = function () {
for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {
var scrollCache = _a[_i];
scrollCache.destroy();
}
};
OffsetTracker.prototype.computeLeft = function () {
var left = this.origRect.left;
for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {
var scrollCache = _a[_i];
left += scrollCache.origScrollLeft - scrollCache.getScrollLeft();
}
return left;
};
OffsetTracker.prototype.computeTop = function () {
var top = this.origRect.top;
for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {
var scrollCache = _a[_i];
top += scrollCache.origScrollTop - scrollCache.getScrollTop();
}
return top;
};
OffsetTracker.prototype.isWithinClipping = function (pageX, pageY) {
var point = { left: pageX, top: pageY };
for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {
var scrollCache = _a[_i];
if (!isIgnoredClipping(scrollCache.getEventTarget()) &&
!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.pointInsideRect)(point, scrollCache.clientRect)) {
return false;
}
}
return true;
};
return OffsetTracker;
}());
// certain clipping containers should never constrain interactions, like and
// https://github.com/fullcalendar/fullcalendar/issues/3615
function isIgnoredClipping(node) {
var tagName = node.tagName;
return tagName === 'HTML' || tagName === 'BODY';
}
/*
Tracks movement over multiple droppable areas (aka "hits")
that exist in one or more DateComponents.
Relies on an existing draggable.
emits:
- pointerdown
- dragstart
- hitchange - fires initially, even if not over a hit
- pointerup
- (hitchange - again, to null, if ended over a hit)
- dragend
*/
var HitDragging = /** @class */ (function () {
function HitDragging(dragging, droppableStore) {
var _this = this;
// options that can be set by caller
this.useSubjectCenter = false;
this.requireInitial = true; // if doesn't start out on a hit, won't emit any events
this.initialHit = null;
this.movingHit = null;
this.finalHit = null; // won't ever be populated if shouldIgnoreMove
this.handlePointerDown = function (ev) {
var dragging = _this.dragging;
_this.initialHit = null;
_this.movingHit = null;
_this.finalHit = null;
_this.prepareHits();
_this.processFirstCoord(ev);
if (_this.initialHit || !_this.requireInitial) {
dragging.setIgnoreMove(false);
// TODO: fire this before computing processFirstCoord, so listeners can cancel. this gets fired by almost every handler :(
_this.emitter.trigger('pointerdown', ev);
}
else {
dragging.setIgnoreMove(true);
}
};
this.handleDragStart = function (ev) {
_this.emitter.trigger('dragstart', ev);
_this.handleMove(ev, true); // force = fire even if initially null
};
this.handleDragMove = function (ev) {
_this.emitter.trigger('dragmove', ev);
_this.handleMove(ev);
};
this.handlePointerUp = function (ev) {
_this.releaseHits();
_this.emitter.trigger('pointerup', ev);
};
this.handleDragEnd = function (ev) {
if (_this.movingHit) {
_this.emitter.trigger('hitupdate', null, true, ev);
}
_this.finalHit = _this.movingHit;
_this.movingHit = null;
_this.emitter.trigger('dragend', ev);
};
this.droppableStore = droppableStore;
dragging.emitter.on('pointerdown', this.handlePointerDown);
dragging.emitter.on('dragstart', this.handleDragStart);
dragging.emitter.on('dragmove', this.handleDragMove);
dragging.emitter.on('pointerup', this.handlePointerUp);
dragging.emitter.on('dragend', this.handleDragEnd);
this.dragging = dragging;
this.emitter = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.Emitter();
}
// sets initialHit
// sets coordAdjust
HitDragging.prototype.processFirstCoord = function (ev) {
var origPoint = { left: ev.pageX, top: ev.pageY };
var adjustedPoint = origPoint;
var subjectEl = ev.subjectEl;
var subjectRect;
if (subjectEl instanceof HTMLElement) { // i.e. not a Document/ShadowRoot
subjectRect = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.computeRect)(subjectEl);
adjustedPoint = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.constrainPoint)(adjustedPoint, subjectRect);
}
var initialHit = this.initialHit = this.queryHitForOffset(adjustedPoint.left, adjustedPoint.top);
if (initialHit) {
if (this.useSubjectCenter && subjectRect) {
var slicedSubjectRect = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.intersectRects)(subjectRect, initialHit.rect);
if (slicedSubjectRect) {
adjustedPoint = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getRectCenter)(slicedSubjectRect);
}
}
this.coordAdjust = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.diffPoints)(adjustedPoint, origPoint);
}
else {
this.coordAdjust = { left: 0, top: 0 };
}
};
HitDragging.prototype.handleMove = function (ev, forceHandle) {
var hit = this.queryHitForOffset(ev.pageX + this.coordAdjust.left, ev.pageY + this.coordAdjust.top);
if (forceHandle || !isHitsEqual(this.movingHit, hit)) {
this.movingHit = hit;
this.emitter.trigger('hitupdate', hit, false, ev);
}
};
HitDragging.prototype.prepareHits = function () {
this.offsetTrackers = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.mapHash)(this.droppableStore, function (interactionSettings) {
interactionSettings.component.prepareHits();
return new OffsetTracker(interactionSettings.el);
});
};
HitDragging.prototype.releaseHits = function () {
var offsetTrackers = this.offsetTrackers;
for (var id in offsetTrackers) {
offsetTrackers[id].destroy();
}
this.offsetTrackers = {};
};
HitDragging.prototype.queryHitForOffset = function (offsetLeft, offsetTop) {
var _a = this, droppableStore = _a.droppableStore, offsetTrackers = _a.offsetTrackers;
var bestHit = null;
for (var id in droppableStore) {
var component = droppableStore[id].component;
var offsetTracker = offsetTrackers[id];
if (offsetTracker && // wasn't destroyed mid-drag
offsetTracker.isWithinClipping(offsetLeft, offsetTop)) {
var originLeft = offsetTracker.computeLeft();
var originTop = offsetTracker.computeTop();
var positionLeft = offsetLeft - originLeft;
var positionTop = offsetTop - originTop;
var origRect = offsetTracker.origRect;
var width = origRect.right - origRect.left;
var height = origRect.bottom - origRect.top;
if (
// must be within the element's bounds
positionLeft >= 0 && positionLeft < width &&
positionTop >= 0 && positionTop < height) {
var hit = component.queryHit(positionLeft, positionTop, width, height);
if (hit && (
// make sure the hit is within activeRange, meaning it's not a dead cell
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.rangeContainsRange)(hit.dateProfile.activeRange, hit.dateSpan.range)) &&
(!bestHit || hit.layer > bestHit.layer)) {
hit.componentId = id;
hit.context = component.context;
// TODO: better way to re-orient rectangle
hit.rect.left += originLeft;
hit.rect.right += originLeft;
hit.rect.top += originTop;
hit.rect.bottom += originTop;
bestHit = hit;
}
}
}
}
return bestHit;
};
return HitDragging;
}());
function isHitsEqual(hit0, hit1) {
if (!hit0 && !hit1) {
return true;
}
if (Boolean(hit0) !== Boolean(hit1)) {
return false;
}
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.isDateSpansEqual)(hit0.dateSpan, hit1.dateSpan);
}
function buildDatePointApiWithContext(dateSpan, context) {
var props = {};
for (var _i = 0, _a = context.pluginHooks.datePointTransforms; _i < _a.length; _i++) {
var transform = _a[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)(props, transform(dateSpan, context));
}
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)(props, buildDatePointApi(dateSpan, context.dateEnv));
return props;
}
function buildDatePointApi(span, dateEnv) {
return {
date: dateEnv.toDate(span.range.start),
dateStr: dateEnv.formatIso(span.range.start, { omitTime: span.allDay }),
allDay: span.allDay,
};
}
/*
Monitors when the user clicks on a specific date/time of a component.
A pointerdown+pointerup on the same "hit" constitutes a click.
*/
var DateClicking = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(DateClicking, _super);
function DateClicking(settings) {
var _this = _super.call(this, settings) || this;
_this.handlePointerDown = function (pev) {
var dragging = _this.dragging;
var downEl = pev.origEvent.target;
// do this in pointerdown (not dragend) because DOM might be mutated by the time dragend is fired
dragging.setIgnoreMove(!_this.component.isValidDateDownEl(downEl));
};
// won't even fire if moving was ignored
_this.handleDragEnd = function (ev) {
var component = _this.component;
var pointer = _this.dragging.pointer;
if (!pointer.wasTouchScroll) {
var _a = _this.hitDragging, initialHit = _a.initialHit, finalHit = _a.finalHit;
if (initialHit && finalHit && isHitsEqual(initialHit, finalHit)) {
var context = component.context;
var arg = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, buildDatePointApiWithContext(initialHit.dateSpan, context)), { dayEl: initialHit.dayEl, jsEvent: ev.origEvent, view: context.viewApi || context.calendarApi.view });
context.emitter.trigger('dateClick', arg);
}
}
};
// we DO want to watch pointer moves because otherwise finalHit won't get populated
_this.dragging = new FeaturefulElementDragging(settings.el);
_this.dragging.autoScroller.isEnabled = false;
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.interactionSettingsToStore)(settings));
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
hitDragging.emitter.on('dragend', _this.handleDragEnd);
return _this;
}
DateClicking.prototype.destroy = function () {
this.dragging.destroy();
};
return DateClicking;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.Interaction));
/*
Tracks when the user selects a portion of time of a component,
constituted by a drag over date cells, with a possible delay at the beginning of the drag.
*/
var DateSelecting = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(DateSelecting, _super);
function DateSelecting(settings) {
var _this = _super.call(this, settings) || this;
_this.dragSelection = null;
_this.handlePointerDown = function (ev) {
var _a = _this, component = _a.component, dragging = _a.dragging;
var options = component.context.options;
var canSelect = options.selectable &&
component.isValidDateDownEl(ev.origEvent.target);
// don't bother to watch expensive moves if component won't do selection
dragging.setIgnoreMove(!canSelect);
// if touch, require user to hold down
dragging.delay = ev.isTouch ? getComponentTouchDelay$1(component) : null;
};
_this.handleDragStart = function (ev) {
_this.component.context.calendarApi.unselect(ev); // unselect previous selections
};
_this.handleHitUpdate = function (hit, isFinal) {
var context = _this.component.context;
var dragSelection = null;
var isInvalid = false;
if (hit) {
var initialHit = _this.hitDragging.initialHit;
var disallowed = hit.componentId === initialHit.componentId
&& _this.isHitComboAllowed
&& !_this.isHitComboAllowed(initialHit, hit);
if (!disallowed) {
dragSelection = joinHitsIntoSelection(initialHit, hit, context.pluginHooks.dateSelectionTransformers);
}
if (!dragSelection || !(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.isDateSelectionValid)(dragSelection, hit.dateProfile, context)) {
isInvalid = true;
dragSelection = null;
}
}
if (dragSelection) {
context.dispatch({ type: 'SELECT_DATES', selection: dragSelection });
}
else if (!isFinal) { // only unselect if moved away while dragging
context.dispatch({ type: 'UNSELECT_DATES' });
}
if (!isInvalid) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.enableCursor)();
}
else {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.disableCursor)();
}
if (!isFinal) {
_this.dragSelection = dragSelection; // only clear if moved away from all hits while dragging
}
};
_this.handlePointerUp = function (pev) {
if (_this.dragSelection) {
// selection is already rendered, so just need to report selection
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.triggerDateSelect)(_this.dragSelection, pev, _this.component.context);
_this.dragSelection = null;
}
};
var component = settings.component;
var options = component.context.options;
var dragging = _this.dragging = new FeaturefulElementDragging(settings.el);
dragging.touchScrollAllowed = false;
dragging.minDistance = options.selectMinDistance || 0;
dragging.autoScroller.isEnabled = options.dragScroll;
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.interactionSettingsToStore)(settings));
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
hitDragging.emitter.on('dragstart', _this.handleDragStart);
hitDragging.emitter.on('hitupdate', _this.handleHitUpdate);
hitDragging.emitter.on('pointerup', _this.handlePointerUp);
return _this;
}
DateSelecting.prototype.destroy = function () {
this.dragging.destroy();
};
return DateSelecting;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.Interaction));
function getComponentTouchDelay$1(component) {
var options = component.context.options;
var delay = options.selectLongPressDelay;
if (delay == null) {
delay = options.longPressDelay;
}
return delay;
}
function joinHitsIntoSelection(hit0, hit1, dateSelectionTransformers) {
var dateSpan0 = hit0.dateSpan;
var dateSpan1 = hit1.dateSpan;
var ms = [
dateSpan0.range.start,
dateSpan0.range.end,
dateSpan1.range.start,
dateSpan1.range.end,
];
ms.sort(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.compareNumbers);
var props = {};
for (var _i = 0, dateSelectionTransformers_1 = dateSelectionTransformers; _i < dateSelectionTransformers_1.length; _i++) {
var transformer = dateSelectionTransformers_1[_i];
var res = transformer(hit0, hit1);
if (res === false) {
return null;
}
if (res) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)(props, res);
}
}
props.range = { start: ms[0], end: ms[3] };
props.allDay = dateSpan0.allDay;
return props;
}
var EventDragging = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(EventDragging, _super);
function EventDragging(settings) {
var _this = _super.call(this, settings) || this;
// internal state
_this.subjectEl = null;
_this.subjectSeg = null; // the seg being selected/dragged
_this.isDragging = false;
_this.eventRange = null;
_this.relevantEvents = null; // the events being dragged
_this.receivingContext = null;
_this.validMutation = null;
_this.mutatedRelevantEvents = null;
_this.handlePointerDown = function (ev) {
var origTarget = ev.origEvent.target;
var _a = _this, component = _a.component, dragging = _a.dragging;
var mirror = dragging.mirror;
var options = component.context.options;
var initialContext = component.context;
_this.subjectEl = ev.subjectEl;
var subjectSeg = _this.subjectSeg = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getElSeg)(ev.subjectEl);
var eventRange = _this.eventRange = subjectSeg.eventRange;
var eventInstanceId = eventRange.instance.instanceId;
_this.relevantEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getRelevantEvents)(initialContext.getCurrentData().eventStore, eventInstanceId);
dragging.minDistance = ev.isTouch ? 0 : options.eventDragMinDistance;
dragging.delay =
// only do a touch delay if touch and this event hasn't been selected yet
(ev.isTouch && eventInstanceId !== component.props.eventSelection) ?
getComponentTouchDelay(component) :
null;
if (options.fixedMirrorParent) {
mirror.parentNode = options.fixedMirrorParent;
}
else {
mirror.parentNode = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(origTarget, '.fc');
}
mirror.revertDuration = options.dragRevertDuration;
var isValid = component.isValidSegDownEl(origTarget) &&
!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(origTarget, '.fc-event-resizer'); // NOT on a resizer
dragging.setIgnoreMove(!isValid);
// disable dragging for elements that are resizable (ie, selectable)
// but are not draggable
_this.isDragging = isValid &&
ev.subjectEl.classList.contains('fc-event-draggable');
};
_this.handleDragStart = function (ev) {
var initialContext = _this.component.context;
var eventRange = _this.eventRange;
var eventInstanceId = eventRange.instance.instanceId;
if (ev.isTouch) {
// need to select a different event?
if (eventInstanceId !== _this.component.props.eventSelection) {
initialContext.dispatch({ type: 'SELECT_EVENT', eventInstanceId: eventInstanceId });
}
}
else {
// if now using mouse, but was previous touch interaction, clear selected event
initialContext.dispatch({ type: 'UNSELECT_EVENT' });
}
if (_this.isDragging) {
initialContext.calendarApi.unselect(ev); // unselect *date* selection
initialContext.emitter.trigger('eventDragStart', {
el: _this.subjectEl,
event: new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(initialContext, eventRange.def, eventRange.instance),
jsEvent: ev.origEvent,
view: initialContext.viewApi,
});
}
};
_this.handleHitUpdate = function (hit, isFinal) {
if (!_this.isDragging) {
return;
}
var relevantEvents = _this.relevantEvents;
var initialHit = _this.hitDragging.initialHit;
var initialContext = _this.component.context;
// states based on new hit
var receivingContext = null;
var mutation = null;
var mutatedRelevantEvents = null;
var isInvalid = false;
var interaction = {
affectedEvents: relevantEvents,
mutatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)(),
isEvent: true,
};
if (hit) {
receivingContext = hit.context;
var receivingOptions = receivingContext.options;
if (initialContext === receivingContext ||
(receivingOptions.editable && receivingOptions.droppable)) {
mutation = computeEventMutation(initialHit, hit, receivingContext.getCurrentData().pluginHooks.eventDragMutationMassagers);
if (mutation) {
mutatedRelevantEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.applyMutationToEventStore)(relevantEvents, receivingContext.getCurrentData().eventUiBases, mutation, receivingContext);
interaction.mutatedEvents = mutatedRelevantEvents;
if (!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.isInteractionValid)(interaction, hit.dateProfile, receivingContext)) {
isInvalid = true;
mutation = null;
mutatedRelevantEvents = null;
interaction.mutatedEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)();
}
}
}
else {
receivingContext = null;
}
}
_this.displayDrag(receivingContext, interaction);
if (!isInvalid) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.enableCursor)();
}
else {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.disableCursor)();
}
if (!isFinal) {
if (initialContext === receivingContext && // TODO: write test for this
isHitsEqual(initialHit, hit)) {
mutation = null;
}
_this.dragging.setMirrorNeedsRevert(!mutation);
// render the mirror if no already-rendered mirror
// TODO: wish we could somehow wait for dispatch to guarantee render
_this.dragging.setMirrorIsVisible(!hit || !(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getElRoot)(_this.subjectEl).querySelector('.fc-event-mirror'));
// assign states based on new hit
_this.receivingContext = receivingContext;
_this.validMutation = mutation;
_this.mutatedRelevantEvents = mutatedRelevantEvents;
}
};
_this.handlePointerUp = function () {
if (!_this.isDragging) {
_this.cleanup(); // because handleDragEnd won't fire
}
};
_this.handleDragEnd = function (ev) {
if (_this.isDragging) {
var initialContext_1 = _this.component.context;
var initialView = initialContext_1.viewApi;
var _a = _this, receivingContext_1 = _a.receivingContext, validMutation = _a.validMutation;
var eventDef = _this.eventRange.def;
var eventInstance = _this.eventRange.instance;
var eventApi = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(initialContext_1, eventDef, eventInstance);
var relevantEvents_1 = _this.relevantEvents;
var mutatedRelevantEvents_1 = _this.mutatedRelevantEvents;
var finalHit = _this.hitDragging.finalHit;
_this.clearDrag(); // must happen after revert animation
initialContext_1.emitter.trigger('eventDragStop', {
el: _this.subjectEl,
event: eventApi,
jsEvent: ev.origEvent,
view: initialView,
});
if (validMutation) {
// dropped within same calendar
if (receivingContext_1 === initialContext_1) {
var updatedEventApi = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(initialContext_1, mutatedRelevantEvents_1.defs[eventDef.defId], eventInstance ? mutatedRelevantEvents_1.instances[eventInstance.instanceId] : null);
initialContext_1.dispatch({
type: 'MERGE_EVENTS',
eventStore: mutatedRelevantEvents_1,
});
var eventChangeArg = {
oldEvent: eventApi,
event: updatedEventApi,
relatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.buildEventApis)(mutatedRelevantEvents_1, initialContext_1, eventInstance),
revert: function () {
initialContext_1.dispatch({
type: 'MERGE_EVENTS',
eventStore: relevantEvents_1, // the pre-change data
});
},
};
var transformed = {};
for (var _i = 0, _b = initialContext_1.getCurrentData().pluginHooks.eventDropTransformers; _i < _b.length; _i++) {
var transformer = _b[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)(transformed, transformer(validMutation, initialContext_1));
}
initialContext_1.emitter.trigger('eventDrop', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, eventChangeArg), transformed), { el: ev.subjectEl, delta: validMutation.datesDelta, jsEvent: ev.origEvent, view: initialView }));
initialContext_1.emitter.trigger('eventChange', eventChangeArg);
// dropped in different calendar
}
else if (receivingContext_1) {
var eventRemoveArg = {
event: eventApi,
relatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.buildEventApis)(relevantEvents_1, initialContext_1, eventInstance),
revert: function () {
initialContext_1.dispatch({
type: 'MERGE_EVENTS',
eventStore: relevantEvents_1,
});
},
};
initialContext_1.emitter.trigger('eventLeave', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, eventRemoveArg), { draggedEl: ev.subjectEl, view: initialView }));
initialContext_1.dispatch({
type: 'REMOVE_EVENTS',
eventStore: relevantEvents_1,
});
initialContext_1.emitter.trigger('eventRemove', eventRemoveArg);
var addedEventDef = mutatedRelevantEvents_1.defs[eventDef.defId];
var addedEventInstance = mutatedRelevantEvents_1.instances[eventInstance.instanceId];
var addedEventApi = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(receivingContext_1, addedEventDef, addedEventInstance);
receivingContext_1.dispatch({
type: 'MERGE_EVENTS',
eventStore: mutatedRelevantEvents_1,
});
var eventAddArg = {
event: addedEventApi,
relatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.buildEventApis)(mutatedRelevantEvents_1, receivingContext_1, addedEventInstance),
revert: function () {
receivingContext_1.dispatch({
type: 'REMOVE_EVENTS',
eventStore: mutatedRelevantEvents_1,
});
},
};
receivingContext_1.emitter.trigger('eventAdd', eventAddArg);
if (ev.isTouch) {
receivingContext_1.dispatch({
type: 'SELECT_EVENT',
eventInstanceId: eventInstance.instanceId,
});
}
receivingContext_1.emitter.trigger('drop', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, buildDatePointApiWithContext(finalHit.dateSpan, receivingContext_1)), { draggedEl: ev.subjectEl, jsEvent: ev.origEvent, view: finalHit.context.viewApi }));
receivingContext_1.emitter.trigger('eventReceive', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, eventAddArg), { draggedEl: ev.subjectEl, view: finalHit.context.viewApi }));
}
}
else {
initialContext_1.emitter.trigger('_noEventDrop');
}
}
_this.cleanup();
};
var component = _this.component;
var options = component.context.options;
var dragging = _this.dragging = new FeaturefulElementDragging(settings.el);
dragging.pointer.selector = EventDragging.SELECTOR;
dragging.touchScrollAllowed = false;
dragging.autoScroller.isEnabled = options.dragScroll;
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.interactionSettingsStore);
hitDragging.useSubjectCenter = settings.useEventCenter;
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
hitDragging.emitter.on('dragstart', _this.handleDragStart);
hitDragging.emitter.on('hitupdate', _this.handleHitUpdate);
hitDragging.emitter.on('pointerup', _this.handlePointerUp);
hitDragging.emitter.on('dragend', _this.handleDragEnd);
return _this;
}
EventDragging.prototype.destroy = function () {
this.dragging.destroy();
};
// render a drag state on the next receivingCalendar
EventDragging.prototype.displayDrag = function (nextContext, state) {
var initialContext = this.component.context;
var prevContext = this.receivingContext;
// does the previous calendar need to be cleared?
if (prevContext && prevContext !== nextContext) {
// does the initial calendar need to be cleared?
// if so, don't clear all the way. we still need to to hide the affectedEvents
if (prevContext === initialContext) {
prevContext.dispatch({
type: 'SET_EVENT_DRAG',
state: {
affectedEvents: state.affectedEvents,
mutatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)(),
isEvent: true,
},
});
// completely clear the old calendar if it wasn't the initial
}
else {
prevContext.dispatch({ type: 'UNSET_EVENT_DRAG' });
}
}
if (nextContext) {
nextContext.dispatch({ type: 'SET_EVENT_DRAG', state: state });
}
};
EventDragging.prototype.clearDrag = function () {
var initialCalendar = this.component.context;
var receivingContext = this.receivingContext;
if (receivingContext) {
receivingContext.dispatch({ type: 'UNSET_EVENT_DRAG' });
}
// the initial calendar might have an dummy drag state from displayDrag
if (initialCalendar !== receivingContext) {
initialCalendar.dispatch({ type: 'UNSET_EVENT_DRAG' });
}
};
EventDragging.prototype.cleanup = function () {
this.subjectSeg = null;
this.isDragging = false;
this.eventRange = null;
this.relevantEvents = null;
this.receivingContext = null;
this.validMutation = null;
this.mutatedRelevantEvents = null;
};
// TODO: test this in IE11
// QUESTION: why do we need it on the resizable???
EventDragging.SELECTOR = '.fc-event-draggable, .fc-event-resizable';
return EventDragging;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.Interaction));
function computeEventMutation(hit0, hit1, massagers) {
var dateSpan0 = hit0.dateSpan;
var dateSpan1 = hit1.dateSpan;
var date0 = dateSpan0.range.start;
var date1 = dateSpan1.range.start;
var standardProps = {};
if (dateSpan0.allDay !== dateSpan1.allDay) {
standardProps.allDay = dateSpan1.allDay;
standardProps.hasEnd = hit1.context.options.allDayMaintainDuration;
if (dateSpan1.allDay) {
// means date1 is already start-of-day,
// but date0 needs to be converted
date0 = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.startOfDay)(date0);
}
}
var delta = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.diffDates)(date0, date1, hit0.context.dateEnv, hit0.componentId === hit1.componentId ?
hit0.largeUnit :
null);
if (delta.milliseconds) { // has hours/minutes/seconds
standardProps.allDay = false;
}
var mutation = {
datesDelta: delta,
standardProps: standardProps,
};
for (var _i = 0, massagers_1 = massagers; _i < massagers_1.length; _i++) {
var massager = massagers_1[_i];
massager(mutation, hit0, hit1);
}
return mutation;
}
function getComponentTouchDelay(component) {
var options = component.context.options;
var delay = options.eventLongPressDelay;
if (delay == null) {
delay = options.longPressDelay;
}
return delay;
}
var EventResizing = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(EventResizing, _super);
function EventResizing(settings) {
var _this = _super.call(this, settings) || this;
// internal state
_this.draggingSegEl = null;
_this.draggingSeg = null; // TODO: rename to resizingSeg? subjectSeg?
_this.eventRange = null;
_this.relevantEvents = null;
_this.validMutation = null;
_this.mutatedRelevantEvents = null;
_this.handlePointerDown = function (ev) {
var component = _this.component;
var segEl = _this.querySegEl(ev);
var seg = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getElSeg)(segEl);
var eventRange = _this.eventRange = seg.eventRange;
_this.dragging.minDistance = component.context.options.eventDragMinDistance;
// if touch, need to be working with a selected event
_this.dragging.setIgnoreMove(!_this.component.isValidSegDownEl(ev.origEvent.target) ||
(ev.isTouch && _this.component.props.eventSelection !== eventRange.instance.instanceId));
};
_this.handleDragStart = function (ev) {
var context = _this.component.context;
var eventRange = _this.eventRange;
_this.relevantEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getRelevantEvents)(context.getCurrentData().eventStore, _this.eventRange.instance.instanceId);
var segEl = _this.querySegEl(ev);
_this.draggingSegEl = segEl;
_this.draggingSeg = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getElSeg)(segEl);
context.calendarApi.unselect();
context.emitter.trigger('eventResizeStart', {
el: segEl,
event: new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(context, eventRange.def, eventRange.instance),
jsEvent: ev.origEvent,
view: context.viewApi,
});
};
_this.handleHitUpdate = function (hit, isFinal, ev) {
var context = _this.component.context;
var relevantEvents = _this.relevantEvents;
var initialHit = _this.hitDragging.initialHit;
var eventInstance = _this.eventRange.instance;
var mutation = null;
var mutatedRelevantEvents = null;
var isInvalid = false;
var interaction = {
affectedEvents: relevantEvents,
mutatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)(),
isEvent: true,
};
if (hit) {
var disallowed = hit.componentId === initialHit.componentId
&& _this.isHitComboAllowed
&& !_this.isHitComboAllowed(initialHit, hit);
if (!disallowed) {
mutation = computeMutation(initialHit, hit, ev.subjectEl.classList.contains('fc-event-resizer-start'), eventInstance.range);
}
}
if (mutation) {
mutatedRelevantEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.applyMutationToEventStore)(relevantEvents, context.getCurrentData().eventUiBases, mutation, context);
interaction.mutatedEvents = mutatedRelevantEvents;
if (!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.isInteractionValid)(interaction, hit.dateProfile, context)) {
isInvalid = true;
mutation = null;
mutatedRelevantEvents = null;
interaction.mutatedEvents = null;
}
}
if (mutatedRelevantEvents) {
context.dispatch({
type: 'SET_EVENT_RESIZE',
state: interaction,
});
}
else {
context.dispatch({ type: 'UNSET_EVENT_RESIZE' });
}
if (!isInvalid) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.enableCursor)();
}
else {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.disableCursor)();
}
if (!isFinal) {
if (mutation && isHitsEqual(initialHit, hit)) {
mutation = null;
}
_this.validMutation = mutation;
_this.mutatedRelevantEvents = mutatedRelevantEvents;
}
};
_this.handleDragEnd = function (ev) {
var context = _this.component.context;
var eventDef = _this.eventRange.def;
var eventInstance = _this.eventRange.instance;
var eventApi = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(context, eventDef, eventInstance);
var relevantEvents = _this.relevantEvents;
var mutatedRelevantEvents = _this.mutatedRelevantEvents;
context.emitter.trigger('eventResizeStop', {
el: _this.draggingSegEl,
event: eventApi,
jsEvent: ev.origEvent,
view: context.viewApi,
});
if (_this.validMutation) {
var updatedEventApi = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(context, mutatedRelevantEvents.defs[eventDef.defId], eventInstance ? mutatedRelevantEvents.instances[eventInstance.instanceId] : null);
context.dispatch({
type: 'MERGE_EVENTS',
eventStore: mutatedRelevantEvents,
});
var eventChangeArg = {
oldEvent: eventApi,
event: updatedEventApi,
relatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.buildEventApis)(mutatedRelevantEvents, context, eventInstance),
revert: function () {
context.dispatch({
type: 'MERGE_EVENTS',
eventStore: relevantEvents, // the pre-change events
});
},
};
context.emitter.trigger('eventResize', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, eventChangeArg), { el: _this.draggingSegEl, startDelta: _this.validMutation.startDelta || (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createDuration)(0), endDelta: _this.validMutation.endDelta || (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createDuration)(0), jsEvent: ev.origEvent, view: context.viewApi }));
context.emitter.trigger('eventChange', eventChangeArg);
}
else {
context.emitter.trigger('_noEventResize');
}
// reset all internal state
_this.draggingSeg = null;
_this.relevantEvents = null;
_this.validMutation = null;
// okay to keep eventInstance around. useful to set it in handlePointerDown
};
var component = settings.component;
var dragging = _this.dragging = new FeaturefulElementDragging(settings.el);
dragging.pointer.selector = '.fc-event-resizer';
dragging.touchScrollAllowed = false;
dragging.autoScroller.isEnabled = component.context.options.dragScroll;
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.interactionSettingsToStore)(settings));
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
hitDragging.emitter.on('dragstart', _this.handleDragStart);
hitDragging.emitter.on('hitupdate', _this.handleHitUpdate);
hitDragging.emitter.on('dragend', _this.handleDragEnd);
return _this;
}
EventResizing.prototype.destroy = function () {
this.dragging.destroy();
};
EventResizing.prototype.querySegEl = function (ev) {
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(ev.subjectEl, '.fc-event');
};
return EventResizing;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.Interaction));
function computeMutation(hit0, hit1, isFromStart, instanceRange) {
var dateEnv = hit0.context.dateEnv;
var date0 = hit0.dateSpan.range.start;
var date1 = hit1.dateSpan.range.start;
var delta = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.diffDates)(date0, date1, dateEnv, hit0.largeUnit);
if (isFromStart) {
if (dateEnv.add(instanceRange.start, delta) < instanceRange.end) {
return { startDelta: delta };
}
}
else if (dateEnv.add(instanceRange.end, delta) > instanceRange.start) {
return { endDelta: delta };
}
return null;
}
var UnselectAuto = /** @class */ (function () {
function UnselectAuto(context) {
var _this = this;
this.context = context;
this.isRecentPointerDateSelect = false; // wish we could use a selector to detect date selection, but uses hit system
this.matchesCancel = false;
this.matchesEvent = false;
this.onSelect = function (selectInfo) {
if (selectInfo.jsEvent) {
_this.isRecentPointerDateSelect = true;
}
};
this.onDocumentPointerDown = function (pev) {
var unselectCancel = _this.context.options.unselectCancel;
var downEl = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getEventTargetViaRoot)(pev.origEvent);
_this.matchesCancel = !!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(downEl, unselectCancel);
_this.matchesEvent = !!(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementClosest)(downEl, EventDragging.SELECTOR); // interaction started on an event?
};
this.onDocumentPointerUp = function (pev) {
var context = _this.context;
var documentPointer = _this.documentPointer;
var calendarState = context.getCurrentData();
// touch-scrolling should never unfocus any type of selection
if (!documentPointer.wasTouchScroll) {
if (calendarState.dateSelection && // an existing date selection?
!_this.isRecentPointerDateSelect // a new pointer-initiated date selection since last onDocumentPointerUp?
) {
var unselectAuto = context.options.unselectAuto;
if (unselectAuto && (!unselectAuto || !_this.matchesCancel)) {
context.calendarApi.unselect(pev);
}
}
if (calendarState.eventSelection && // an existing event selected?
!_this.matchesEvent // interaction DIDN'T start on an event
) {
context.dispatch({ type: 'UNSELECT_EVENT' });
}
}
_this.isRecentPointerDateSelect = false;
};
var documentPointer = this.documentPointer = new PointerDragging(document);
documentPointer.shouldIgnoreMove = true;
documentPointer.shouldWatchScroll = false;
documentPointer.emitter.on('pointerdown', this.onDocumentPointerDown);
documentPointer.emitter.on('pointerup', this.onDocumentPointerUp);
/*
TODO: better way to know about whether there was a selection with the pointer
*/
context.emitter.on('select', this.onSelect);
}
UnselectAuto.prototype.destroy = function () {
this.context.emitter.off('select', this.onSelect);
this.documentPointer.destroy();
};
return UnselectAuto;
}());
var OPTION_REFINERS = {
fixedMirrorParent: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
};
var LISTENER_REFINERS = {
dateClick: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventDragStart: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventDragStop: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventDrop: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventResizeStart: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventResizeStop: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventResize: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
drop: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventReceive: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
eventLeave: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.identity,
};
/*
Given an already instantiated draggable object for one-or-more elements,
Interprets any dragging as an attempt to drag an events that lives outside
of a calendar onto a calendar.
*/
var ExternalElementDragging = /** @class */ (function () {
function ExternalElementDragging(dragging, suppliedDragMeta) {
var _this = this;
this.receivingContext = null;
this.droppableEvent = null; // will exist for all drags, even if create:false
this.suppliedDragMeta = null;
this.dragMeta = null;
this.handleDragStart = function (ev) {
_this.dragMeta = _this.buildDragMeta(ev.subjectEl);
};
this.handleHitUpdate = function (hit, isFinal, ev) {
var dragging = _this.hitDragging.dragging;
var receivingContext = null;
var droppableEvent = null;
var isInvalid = false;
var interaction = {
affectedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)(),
mutatedEvents: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)(),
isEvent: _this.dragMeta.create,
};
if (hit) {
receivingContext = hit.context;
if (_this.canDropElOnCalendar(ev.subjectEl, receivingContext)) {
droppableEvent = computeEventForDateSpan(hit.dateSpan, _this.dragMeta, receivingContext);
interaction.mutatedEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.eventTupleToStore)(droppableEvent);
isInvalid = !(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.isInteractionValid)(interaction, hit.dateProfile, receivingContext);
if (isInvalid) {
interaction.mutatedEvents = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEmptyEventStore)();
droppableEvent = null;
}
}
}
_this.displayDrag(receivingContext, interaction);
// show mirror if no already-rendered mirror element OR if we are shutting down the mirror (?)
// TODO: wish we could somehow wait for dispatch to guarantee render
dragging.setMirrorIsVisible(isFinal || !droppableEvent || !document.querySelector('.fc-event-mirror'));
if (!isInvalid) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.enableCursor)();
}
else {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.disableCursor)();
}
if (!isFinal) {
dragging.setMirrorNeedsRevert(!droppableEvent);
_this.receivingContext = receivingContext;
_this.droppableEvent = droppableEvent;
}
};
this.handleDragEnd = function (pev) {
var _a = _this, receivingContext = _a.receivingContext, droppableEvent = _a.droppableEvent;
_this.clearDrag();
if (receivingContext && droppableEvent) {
var finalHit = _this.hitDragging.finalHit;
var finalView = finalHit.context.viewApi;
var dragMeta = _this.dragMeta;
receivingContext.emitter.trigger('drop', (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, buildDatePointApiWithContext(finalHit.dateSpan, receivingContext)), { draggedEl: pev.subjectEl, jsEvent: pev.origEvent, view: finalView }));
if (dragMeta.create) {
var addingEvents_1 = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.eventTupleToStore)(droppableEvent);
receivingContext.dispatch({
type: 'MERGE_EVENTS',
eventStore: addingEvents_1,
});
if (pev.isTouch) {
receivingContext.dispatch({
type: 'SELECT_EVENT',
eventInstanceId: droppableEvent.instance.instanceId,
});
}
// signal that an external event landed
receivingContext.emitter.trigger('eventReceive', {
event: new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.EventApi(receivingContext, droppableEvent.def, droppableEvent.instance),
relatedEvents: [],
revert: function () {
receivingContext.dispatch({
type: 'REMOVE_EVENTS',
eventStore: addingEvents_1,
});
},
draggedEl: pev.subjectEl,
view: finalView,
});
}
}
_this.receivingContext = null;
_this.droppableEvent = null;
};
var hitDragging = this.hitDragging = new HitDragging(dragging, _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.interactionSettingsStore);
hitDragging.requireInitial = false; // will start outside of a component
hitDragging.emitter.on('dragstart', this.handleDragStart);
hitDragging.emitter.on('hitupdate', this.handleHitUpdate);
hitDragging.emitter.on('dragend', this.handleDragEnd);
this.suppliedDragMeta = suppliedDragMeta;
}
ExternalElementDragging.prototype.buildDragMeta = function (subjectEl) {
if (typeof this.suppliedDragMeta === 'object') {
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.parseDragMeta)(this.suppliedDragMeta);
}
if (typeof this.suppliedDragMeta === 'function') {
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.parseDragMeta)(this.suppliedDragMeta(subjectEl));
}
return getDragMetaFromEl(subjectEl);
};
ExternalElementDragging.prototype.displayDrag = function (nextContext, state) {
var prevContext = this.receivingContext;
if (prevContext && prevContext !== nextContext) {
prevContext.dispatch({ type: 'UNSET_EVENT_DRAG' });
}
if (nextContext) {
nextContext.dispatch({ type: 'SET_EVENT_DRAG', state: state });
}
};
ExternalElementDragging.prototype.clearDrag = function () {
if (this.receivingContext) {
this.receivingContext.dispatch({ type: 'UNSET_EVENT_DRAG' });
}
};
ExternalElementDragging.prototype.canDropElOnCalendar = function (el, receivingContext) {
var dropAccept = receivingContext.options.dropAccept;
if (typeof dropAccept === 'function') {
return dropAccept.call(receivingContext.calendarApi, el);
}
if (typeof dropAccept === 'string' && dropAccept) {
return Boolean((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.elementMatches)(el, dropAccept));
}
return true;
};
return ExternalElementDragging;
}());
// Utils for computing event store from the DragMeta
// ----------------------------------------------------------------------------------------------------
function computeEventForDateSpan(dateSpan, dragMeta, context) {
var defProps = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, dragMeta.leftoverProps);
for (var _i = 0, _a = context.pluginHooks.externalDefTransforms; _i < _a.length; _i++) {
var transform = _a[_i];
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)(defProps, transform(dateSpan, dragMeta));
}
var _b = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.refineEventDef)(defProps, context), refined = _b.refined, extra = _b.extra;
var def = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.parseEventDef)(refined, extra, dragMeta.sourceId, dateSpan.allDay, context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd
context);
var start = dateSpan.range.start;
// only rely on time info if drop zone is all-day,
// otherwise, we already know the time
if (dateSpan.allDay && dragMeta.startTime) {
start = context.dateEnv.add(start, dragMeta.startTime);
}
var end = dragMeta.duration ?
context.dateEnv.add(start, dragMeta.duration) :
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.getDefaultEventEnd)(dateSpan.allDay, start, context);
var instance = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createEventInstance)(def.defId, { start: start, end: end });
return { def: def, instance: instance };
}
// Utils for extracting data from element
// ----------------------------------------------------------------------------------------------------
function getDragMetaFromEl(el) {
var str = getEmbeddedElData(el, 'event');
var obj = str ?
JSON.parse(str) :
{ create: false }; // if no embedded data, assume no event creation
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.parseDragMeta)(obj);
}
_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.config.dataAttrPrefix = '';
function getEmbeddedElData(el, name) {
var prefix = _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.config.dataAttrPrefix;
var prefixedName = (prefix ? prefix + '-' : '') + name;
return el.getAttribute('data-' + prefixedName) || '';
}
/*
Makes an element (that is *external* to any calendar) draggable.
Can pass in data that determines how an event will be created when dropped onto a calendar.
Leverages FullCalendar's internal drag-n-drop functionality WITHOUT a third-party drag system.
*/
var ExternalDraggable = /** @class */ (function () {
function ExternalDraggable(el, settings) {
var _this = this;
if (settings === void 0) { settings = {}; }
this.handlePointerDown = function (ev) {
var dragging = _this.dragging;
var _a = _this.settings, minDistance = _a.minDistance, longPressDelay = _a.longPressDelay;
dragging.minDistance =
minDistance != null ?
minDistance :
(ev.isTouch ? 0 : _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.BASE_OPTION_DEFAULTS.eventDragMinDistance);
dragging.delay =
ev.isTouch ? // TODO: eventually read eventLongPressDelay instead vvv
(longPressDelay != null ? longPressDelay : _fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.BASE_OPTION_DEFAULTS.longPressDelay) :
0;
};
this.handleDragStart = function (ev) {
if (ev.isTouch &&
_this.dragging.delay &&
ev.subjectEl.classList.contains('fc-event')) {
_this.dragging.mirror.getMirrorEl().classList.add('fc-event-selected');
}
};
this.settings = settings;
var dragging = this.dragging = new FeaturefulElementDragging(el);
dragging.touchScrollAllowed = false;
if (settings.itemSelector != null) {
dragging.pointer.selector = settings.itemSelector;
}
if (settings.appendTo != null) {
dragging.mirror.parentNode = settings.appendTo; // TODO: write tests
}
dragging.emitter.on('pointerdown', this.handlePointerDown);
dragging.emitter.on('dragstart', this.handleDragStart);
new ExternalElementDragging(dragging, settings.eventData); // eslint-disable-line no-new
}
ExternalDraggable.prototype.destroy = function () {
this.dragging.destroy();
};
return ExternalDraggable;
}());
/*
Detects when a *THIRD-PARTY* drag-n-drop system interacts with elements.
The third-party system is responsible for drawing the visuals effects of the drag.
This class simply monitors for pointer movements and fires events.
It also has the ability to hide the moving element (the "mirror") during the drag.
*/
var InferredElementDragging = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(InferredElementDragging, _super);
function InferredElementDragging(containerEl) {
var _this = _super.call(this, containerEl) || this;
_this.shouldIgnoreMove = false;
_this.mirrorSelector = '';
_this.currentMirrorEl = null;
_this.handlePointerDown = function (ev) {
_this.emitter.trigger('pointerdown', ev);
if (!_this.shouldIgnoreMove) {
// fire dragstart right away. does not support delay or min-distance
_this.emitter.trigger('dragstart', ev);
}
};
_this.handlePointerMove = function (ev) {
if (!_this.shouldIgnoreMove) {
_this.emitter.trigger('dragmove', ev);
}
};
_this.handlePointerUp = function (ev) {
_this.emitter.trigger('pointerup', ev);
if (!_this.shouldIgnoreMove) {
// fire dragend right away. does not support a revert animation
_this.emitter.trigger('dragend', ev);
}
};
var pointer = _this.pointer = new PointerDragging(containerEl);
pointer.emitter.on('pointerdown', _this.handlePointerDown);
pointer.emitter.on('pointermove', _this.handlePointerMove);
pointer.emitter.on('pointerup', _this.handlePointerUp);
return _this;
}
InferredElementDragging.prototype.destroy = function () {
this.pointer.destroy();
};
InferredElementDragging.prototype.setIgnoreMove = function (bool) {
this.shouldIgnoreMove = bool;
};
InferredElementDragging.prototype.setMirrorIsVisible = function (bool) {
if (bool) {
// restore a previously hidden element.
// use the reference in case the selector class has already been removed.
if (this.currentMirrorEl) {
this.currentMirrorEl.style.visibility = '';
this.currentMirrorEl = null;
}
}
else {
var mirrorEl = this.mirrorSelector
// TODO: somehow query FullCalendars WITHIN shadow-roots
? document.querySelector(this.mirrorSelector)
: null;
if (mirrorEl) {
this.currentMirrorEl = mirrorEl;
mirrorEl.style.visibility = 'hidden';
}
}
};
return InferredElementDragging;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.ElementDragging));
/*
Bridges third-party drag-n-drop systems with FullCalendar.
Must be instantiated and destroyed by caller.
*/
var ThirdPartyDraggable = /** @class */ (function () {
function ThirdPartyDraggable(containerOrSettings, settings) {
var containerEl = document;
if (
// wish we could just test instanceof EventTarget, but doesn't work in IE11
containerOrSettings === document ||
containerOrSettings instanceof Element) {
containerEl = containerOrSettings;
settings = settings || {};
}
else {
settings = (containerOrSettings || {});
}
var dragging = this.dragging = new InferredElementDragging(containerEl);
if (typeof settings.itemSelector === 'string') {
dragging.pointer.selector = settings.itemSelector;
}
else if (containerEl === document) {
dragging.pointer.selector = '[data-event]';
}
if (typeof settings.mirrorSelector === 'string') {
dragging.mirrorSelector = settings.mirrorSelector;
}
new ExternalElementDragging(dragging, settings.eventData); // eslint-disable-line no-new
}
ThirdPartyDraggable.prototype.destroy = function () {
this.dragging.destroy();
};
return ThirdPartyDraggable;
}());
var main = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__.createPlugin)({
componentInteractions: [DateClicking, DateSelecting, EventDragging, EventResizing],
calendarInteractions: [UnselectAuto],
elementDraggingImpl: FeaturefulElementDragging,
optionRefiners: OPTION_REFINERS,
listenerRefiners: LISTENER_REFINERS,
});
/* harmony default export */ __webpack_exports__["default"] = (main);
//# sourceMappingURL=main.js.map
/***/ }),
/***/ "./node_modules/@fullcalendar/list/main.js":
/*!*************************************************!*\
!*** ./node_modules/@fullcalendar/list/main.js ***!
\*************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ListView": function() { return /* binding */ ListView; }
/* harmony export */ });
/* harmony import */ var _main_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main.css */ "./node_modules/@fullcalendar/list/main.css");
/* harmony import */ var _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @fullcalendar/common */ "./node_modules/@fullcalendar/common/main.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/*!
FullCalendar v5.10.2
Docs & License: https://fullcalendar.io/
(c) 2021 Adam Shaw
*/
var ListViewHeaderRow = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ListViewHeaderRow, _super);
function ListViewHeaderRow() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
textId: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getUniqueDomId)(),
};
return _this;
}
ListViewHeaderRow.prototype.render = function () {
var _a = this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options, viewApi = _a.viewApi;
var _b = this.props, cellId = _b.cellId, dayDate = _b.dayDate, todayRange = _b.todayRange;
var textId = this.state.textId;
var dayMeta = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getDateMeta)(dayDate, todayRange);
// will ever be falsy?
var text = options.listDayFormat ? dateEnv.format(dayDate, options.listDayFormat) : '';
// will ever be falsy? also, BAD NAME "alt"
var sideText = options.listDaySideFormat ? dateEnv.format(dayDate, options.listDaySideFormat) : '';
var hookProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ date: dateEnv.toDate(dayDate), view: viewApi, textId: textId,
text: text,
sideText: sideText, navLinkAttrs: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildNavLinkAttrs)(this.context, dayDate), sideNavLinkAttrs: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildNavLinkAttrs)(this.context, dayDate, 'day', false) }, dayMeta);
var classNames = ['fc-list-day'].concat((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getDayClassNames)(dayMeta, theme));
// TODO: make a reusable HOC for dayHeader (used in daygrid/timegrid too)
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInnerContent, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-date": (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.formatDayString)(dayDate) },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", { scope: "colgroup", colSpan: 3, id: cellId, "aria-labelledby": textId },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: 'fc-list-day-cushion ' + theme.getClass('tableCellShaded'), ref: innerElRef }, innerContent)))); }));
};
return ListViewHeaderRow;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function renderInnerContent(props) {
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
props.text && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ id: props.textId, className: "fc-list-day-text" }, props.navLinkAttrs), props.text)),
props.sideText && ( /* not keyboard tabbable */(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ "aria-hidden": true, className: "fc-list-day-side-text" }, props.sideNavLinkAttrs), props.sideText))));
}
var DEFAULT_TIME_FORMAT = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)({
hour: 'numeric',
minute: '2-digit',
meridiem: 'short',
});
var ListViewEventRow = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ListViewEventRow, _super);
function ListViewEventRow() {
return _super !== null && _super.apply(this, arguments) || this;
}
ListViewEventRow.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var seg = props.seg, timeHeaderId = props.timeHeaderId, eventHeaderId = props.eventHeaderId, dateHeaderId = props.dateHeaderId;
var timeFormat = context.options.eventTimeFormat || DEFAULT_TIME_FORMAT;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.EventRoot, { seg: seg, timeText: "" // BAD. because of all-day content
, disableDragging: true, disableResizing: true, defaultContent: function () { return renderEventInnerContent(seg, context); } /* weird */, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, isSelected: props.isSelected, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { className: ['fc-list-event', hookProps.event.url ? 'fc-event-forced-url' : ''].concat(classNames).join(' '), ref: rootElRef },
buildTimeContent(seg, timeFormat, context, timeHeaderId, dateHeaderId),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { "aria-hidden": true, className: "fc-list-event-graphic" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "fc-list-event-dot", style: { borderColor: hookProps.borderColor || hookProps.backgroundColor } })),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { ref: innerElRef, headers: eventHeaderId + " " + dateHeaderId, className: "fc-list-event-title" }, innerContent))); }));
};
return ListViewEventRow;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function renderEventInnerContent(seg, context) {
var interactiveAttrs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegAnchorAttrs)(seg, context);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, interactiveAttrs), seg.eventRange.def.title));
}
function buildTimeContent(seg, timeFormat, context, timeHeaderId, dateHeaderId) {
var options = context.options;
if (options.displayEventTime !== false) {
var eventDef = seg.eventRange.def;
var eventInstance = seg.eventRange.instance;
var doAllDay = false;
var timeText = void 0;
if (eventDef.allDay) {
doAllDay = true;
}
else if ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.isMultiDayRange)(seg.eventRange.range)) { // TODO: use (!isStart || !isEnd) instead?
if (seg.isStart) {
timeText = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildSegTimeText)(seg, timeFormat, context, null, null, eventInstance.range.start, seg.end);
}
else if (seg.isEnd) {
timeText = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildSegTimeText)(seg, timeFormat, context, null, null, seg.start, eventInstance.range.end);
}
else {
doAllDay = true;
}
}
else {
timeText = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildSegTimeText)(seg, timeFormat, context);
}
if (doAllDay) {
var hookProps = {
text: context.options.allDayText,
view: context.viewApi,
};
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RenderHook, { hookProps: hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { ref: rootElRef, headers: timeHeaderId + " " + dateHeaderId, className: ['fc-list-event-time'].concat(classNames).join(' ') }, innerContent)); }));
}
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { className: "fc-list-event-time" }, timeText));
}
return null;
}
function renderAllDayInner(hookProps) {
return hookProps.text;
}
/*
Responsible for the scroller, and forwarding event-related actions into the "grid".
*/
var ListView = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(ListView, _super);
function ListView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.computeDateVars = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(computeDateVars);
_this.eventStoreToSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(_this._eventStoreToSegs);
_this.state = {
timeHeaderId: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getUniqueDomId)(),
eventHeaderId: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getUniqueDomId)(),
dateHeaderIdRoot: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getUniqueDomId)(),
};
_this.setRootEl = function (rootEl) {
if (rootEl) {
_this.context.registerInteractiveComponent(_this, {
el: rootEl,
});
}
else {
_this.context.unregisterInteractiveComponent(_this);
}
};
return _this;
}
ListView.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var extraClassNames = [
'fc-list',
context.theme.getClass('table'),
context.options.stickyHeaderDates !== false ? 'fc-list-sticky' : '',
];
var _b = this.computeDateVars(props.dateProfile), dayDates = _b.dayDates, dayRanges = _b.dayRanges;
var eventSegs = this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.ViewRoot, { viewSpec: context.viewSpec, elRef: this.setRootEl }, function (rootElRef, classNames) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: extraClassNames.concat(classNames).join(' ') },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Scroller, { liquid: !props.isHeightAuto, overflowX: props.isHeightAuto ? 'visible' : 'hidden', overflowY: props.isHeightAuto ? 'visible' : 'auto' }, eventSegs.length > 0 ?
_this.renderSegList(eventSegs, dayDates) :
_this.renderEmptyMessage()))); }));
};
ListView.prototype.renderEmptyMessage = function () {
var _a = this.context, options = _a.options, viewApi = _a.viewApi;
var hookProps = {
text: options.noEventsText,
view: viewApi,
};
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RenderHook, { hookProps: hookProps, classNames: options.noEventsClassNames, content: options.noEventsContent, defaultContent: renderNoEventsInner, didMount: options.noEventsDidMount, willUnmount: options.noEventsWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ['fc-list-empty'].concat(classNames).join(' '), ref: rootElRef },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-list-empty-cushion", ref: innerElRef }, innerContent))); }));
};
ListView.prototype.renderSegList = function (allSegs, dayDates) {
var _a = this.context, theme = _a.theme, options = _a.options;
var _b = this.state, timeHeaderId = _b.timeHeaderId, eventHeaderId = _b.eventHeaderId, dateHeaderIdRoot = _b.dateHeaderIdRoot;
var segsByDay = groupSegsByDay(allSegs); // sparse array
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowTimer, { unit: "day" }, function (nowDate, todayRange) {
var innerNodes = [];
for (var dayIndex = 0; dayIndex < segsByDay.length; dayIndex += 1) {
var daySegs = segsByDay[dayIndex];
if (daySegs) { // sparse array, so might be undefined
var dayStr = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.formatDayString)(dayDates[dayIndex]);
var dateHeaderId = dateHeaderIdRoot + '-' + dayStr;
// append a day header
innerNodes.push((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(ListViewHeaderRow, { key: dayStr, cellId: dateHeaderId, dayDate: dayDates[dayIndex], todayRange: todayRange }));
daySegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.sortEventSegs)(daySegs, options.eventOrder);
for (var _i = 0, daySegs_1 = daySegs; _i < daySegs_1.length; _i++) {
var seg = daySegs_1[_i];
innerNodes.push((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(ListViewEventRow, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ key: dayStr + ':' + seg.eventRange.instance.instanceId /* are multiple segs for an instanceId */, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, timeHeaderId: timeHeaderId, eventHeaderId: eventHeaderId, dateHeaderId: dateHeaderId }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, todayRange, nowDate))));
}
}
}
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("table", { className: 'fc-list-table ' + theme.getClass('table') },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("thead", null,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", null,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", { scope: "col", id: timeHeaderId }, options.timeHint),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", { scope: "col", "aria-hidden": true }),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", { scope: "col", id: eventHeaderId }, options.eventHint))),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tbody", null, innerNodes)));
}));
};
ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {
return this.eventRangesToSegs((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.sliceEventStore)(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.options.nextDayThreshold).fg, dayRanges);
};
ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {
var segs = [];
for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {
var eventRange = eventRanges_1[_i];
segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges));
}
return segs;
};
ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {
var dateEnv = this.context.dateEnv;
var nextDayThreshold = this.context.options.nextDayThreshold;
var range = eventRange.range;
var allDay = eventRange.def.allDay;
var dayIndex;
var segRange;
var seg;
var segs = [];
for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex += 1) {
segRange = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.intersectRanges)(range, dayRanges[dayIndex]);
if (segRange) {
seg = {
component: this,
eventRange: eventRange,
start: segRange.start,
end: segRange.end,
isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),
isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),
dayIndex: dayIndex,
};
segs.push(seg);
// detect when range won't go fully into the next day,
// and mutate the latest seg to the be the end.
if (!seg.isEnd && !allDay &&
dayIndex + 1 < dayRanges.length &&
range.end <
dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) {
seg.end = range.end;
seg.isEnd = true;
break;
}
}
}
return segs;
};
return ListView;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function renderNoEventsInner(hookProps) {
return hookProps.text;
}
function computeDateVars(dateProfile) {
var dayStart = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.startOfDay)(dateProfile.renderRange.start);
var viewEnd = dateProfile.renderRange.end;
var dayDates = [];
var dayRanges = [];
while (dayStart < viewEnd) {
dayDates.push(dayStart);
dayRanges.push({
start: dayStart,
end: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDays)(dayStart, 1),
});
dayStart = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDays)(dayStart, 1);
}
return { dayDates: dayDates, dayRanges: dayRanges };
}
// Returns a sparse array of arrays, segs grouped by their dayIndex
function groupSegsByDay(segs) {
var segsByDay = []; // sparse array
var i;
var seg;
for (i = 0; i < segs.length; i += 1) {
seg = segs[i];
(segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))
.push(seg);
}
return segsByDay;
}
var OPTION_REFINERS = {
listDayFormat: createFalsableFormatter,
listDaySideFormat: createFalsableFormatter,
noEventsClassNames: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.identity,
noEventsContent: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.identity,
noEventsDidMount: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.identity,
noEventsWillUnmount: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.identity,
// noEventsText is defined in base options
};
function createFalsableFormatter(input) {
return input === false ? null : (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)(input);
}
var main = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createPlugin)({
optionRefiners: OPTION_REFINERS,
views: {
list: {
component: ListView,
buttonTextKey: 'list',
listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' }, // like "January 1, 2016"
},
listDay: {
type: 'list',
duration: { days: 1 },
listDayFormat: { weekday: 'long' }, // day-of-week is all we need. full date is probably in headerToolbar
},
listWeek: {
type: 'list',
duration: { weeks: 1 },
listDayFormat: { weekday: 'long' },
listDaySideFormat: { month: 'long', day: 'numeric', year: 'numeric' },
},
listMonth: {
type: 'list',
duration: { month: 1 },
listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have
},
listYear: {
type: 'list',
duration: { year: 1 },
listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have
},
},
});
/* harmony default export */ __webpack_exports__["default"] = (main);
//# sourceMappingURL=main.js.map
/***/ }),
/***/ "./node_modules/@fullcalendar/react/dist/main.js":
/*!*******************************************************!*\
!*** ./node_modules/@fullcalendar/react/dist/main.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BASE_OPTION_DEFAULTS": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.BASE_OPTION_DEFAULTS; },
/* harmony export */ "BASE_OPTION_REFINERS": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.BASE_OPTION_REFINERS; },
/* harmony export */ "BaseComponent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.BaseComponent; },
/* harmony export */ "BgEvent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.BgEvent; },
/* harmony export */ "CalendarApi": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarApi; },
/* harmony export */ "CalendarContent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarContent; },
/* harmony export */ "CalendarDataManager": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarDataManager; },
/* harmony export */ "CalendarDataProvider": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarDataProvider; },
/* harmony export */ "CalendarRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarRoot; },
/* harmony export */ "Component": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Component; },
/* harmony export */ "ContentHook": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ContentHook; },
/* harmony export */ "CustomContentRenderContext": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CustomContentRenderContext; },
/* harmony export */ "DateComponent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DateComponent; },
/* harmony export */ "DateEnv": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DateEnv; },
/* harmony export */ "DateProfileGenerator": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DateProfileGenerator; },
/* harmony export */ "DayCellContent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DayCellContent; },
/* harmony export */ "DayCellRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DayCellRoot; },
/* harmony export */ "DayHeader": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DayHeader; },
/* harmony export */ "DaySeriesModel": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DaySeriesModel; },
/* harmony export */ "DayTableModel": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DayTableModel; },
/* harmony export */ "DelayedRunner": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.DelayedRunner; },
/* harmony export */ "ElementDragging": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ElementDragging; },
/* harmony export */ "ElementScrollController": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ElementScrollController; },
/* harmony export */ "Emitter": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Emitter; },
/* harmony export */ "EventApi": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.EventApi; },
/* harmony export */ "EventRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.EventRoot; },
/* harmony export */ "EventSourceApi": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.EventSourceApi; },
/* harmony export */ "Fragment": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Fragment; },
/* harmony export */ "Interaction": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Interaction; },
/* harmony export */ "MoreLinkRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.MoreLinkRoot; },
/* harmony export */ "MountHook": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.MountHook; },
/* harmony export */ "NamedTimeZoneImpl": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.NamedTimeZoneImpl; },
/* harmony export */ "NowIndicatorRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.NowIndicatorRoot; },
/* harmony export */ "NowTimer": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.NowTimer; },
/* harmony export */ "PositionCache": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.PositionCache; },
/* harmony export */ "RefMap": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.RefMap; },
/* harmony export */ "RenderHook": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.RenderHook; },
/* harmony export */ "ScrollController": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ScrollController; },
/* harmony export */ "ScrollResponder": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ScrollResponder; },
/* harmony export */ "Scroller": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Scroller; },
/* harmony export */ "SegHierarchy": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.SegHierarchy; },
/* harmony export */ "SimpleScrollGrid": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.SimpleScrollGrid; },
/* harmony export */ "Slicer": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Slicer; },
/* harmony export */ "Splitter": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Splitter; },
/* harmony export */ "StandardEvent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.StandardEvent; },
/* harmony export */ "TableDateCell": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.TableDateCell; },
/* harmony export */ "TableDowCell": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.TableDowCell; },
/* harmony export */ "Theme": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.Theme; },
/* harmony export */ "ViewApi": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ViewApi; },
/* harmony export */ "ViewContextType": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ViewContextType; },
/* harmony export */ "ViewRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.ViewRoot; },
/* harmony export */ "WeekNumberRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.WeekNumberRoot; },
/* harmony export */ "WindowScrollController": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.WindowScrollController; },
/* harmony export */ "addDays": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.addDays; },
/* harmony export */ "addDurations": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.addDurations; },
/* harmony export */ "addMs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.addMs; },
/* harmony export */ "addWeeks": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.addWeeks; },
/* harmony export */ "allowContextMenu": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.allowContextMenu; },
/* harmony export */ "allowSelection": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.allowSelection; },
/* harmony export */ "applyMutationToEventStore": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.applyMutationToEventStore; },
/* harmony export */ "applyStyle": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.applyStyle; },
/* harmony export */ "applyStyleProp": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.applyStyleProp; },
/* harmony export */ "asCleanDays": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.asCleanDays; },
/* harmony export */ "asRoughMinutes": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.asRoughMinutes; },
/* harmony export */ "asRoughMs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.asRoughMs; },
/* harmony export */ "asRoughSeconds": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.asRoughSeconds; },
/* harmony export */ "binarySearch": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.binarySearch; },
/* harmony export */ "buildClassNameNormalizer": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildClassNameNormalizer; },
/* harmony export */ "buildEntryKey": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildEntryKey; },
/* harmony export */ "buildEventApis": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildEventApis; },
/* harmony export */ "buildEventRangeKey": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildEventRangeKey; },
/* harmony export */ "buildHashFromArray": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildHashFromArray; },
/* harmony export */ "buildIsoString": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildIsoString; },
/* harmony export */ "buildNavLinkAttrs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildNavLinkAttrs; },
/* harmony export */ "buildSegCompareObj": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildSegCompareObj; },
/* harmony export */ "buildSegTimeText": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.buildSegTimeText; },
/* harmony export */ "collectFromHash": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.collectFromHash; },
/* harmony export */ "combineEventUis": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.combineEventUis; },
/* harmony export */ "compareByFieldSpec": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.compareByFieldSpec; },
/* harmony export */ "compareByFieldSpecs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.compareByFieldSpecs; },
/* harmony export */ "compareNumbers": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.compareNumbers; },
/* harmony export */ "compareObjs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.compareObjs; },
/* harmony export */ "computeEarliestSegStart": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeEarliestSegStart; },
/* harmony export */ "computeEdges": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeEdges; },
/* harmony export */ "computeFallbackHeaderFormat": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeFallbackHeaderFormat; },
/* harmony export */ "computeHeightAndMargins": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeHeightAndMargins; },
/* harmony export */ "computeInnerRect": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeInnerRect; },
/* harmony export */ "computeRect": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeRect; },
/* harmony export */ "computeSegDraggable": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeSegDraggable; },
/* harmony export */ "computeSegEndResizable": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeSegEndResizable; },
/* harmony export */ "computeSegStartResizable": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeSegStartResizable; },
/* harmony export */ "computeShrinkWidth": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeShrinkWidth; },
/* harmony export */ "computeSmallestCellWidth": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeSmallestCellWidth; },
/* harmony export */ "computeVisibleDayRange": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.computeVisibleDayRange; },
/* harmony export */ "config": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.config; },
/* harmony export */ "constrainPoint": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.constrainPoint; },
/* harmony export */ "createAriaClickAttrs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createAriaClickAttrs; },
/* harmony export */ "createContext": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createContext; },
/* harmony export */ "createDuration": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createDuration; },
/* harmony export */ "createElement": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createElement; },
/* harmony export */ "createEmptyEventStore": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createEmptyEventStore; },
/* harmony export */ "createEventInstance": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createEventInstance; },
/* harmony export */ "createEventUi": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createEventUi; },
/* harmony export */ "createFormatter": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createFormatter; },
/* harmony export */ "createPlugin": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createPlugin; },
/* harmony export */ "createPortal": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createPortal; },
/* harmony export */ "createRef": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.createRef; },
/* harmony export */ "diffDates": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffDates; },
/* harmony export */ "diffDayAndTime": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffDayAndTime; },
/* harmony export */ "diffDays": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffDays; },
/* harmony export */ "diffPoints": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffPoints; },
/* harmony export */ "diffWeeks": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffWeeks; },
/* harmony export */ "diffWholeDays": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffWholeDays; },
/* harmony export */ "diffWholeWeeks": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.diffWholeWeeks; },
/* harmony export */ "disableCursor": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.disableCursor; },
/* harmony export */ "elementClosest": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.elementClosest; },
/* harmony export */ "elementMatches": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.elementMatches; },
/* harmony export */ "enableCursor": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.enableCursor; },
/* harmony export */ "eventTupleToStore": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.eventTupleToStore; },
/* harmony export */ "filterEventStoreDefs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.filterEventStoreDefs; },
/* harmony export */ "filterHash": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.filterHash; },
/* harmony export */ "findDirectChildren": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.findDirectChildren; },
/* harmony export */ "findElements": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.findElements; },
/* harmony export */ "flexibleCompare": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.flexibleCompare; },
/* harmony export */ "flushSync": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.flushSync; },
/* harmony export */ "formatDate": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.formatDate; },
/* harmony export */ "formatDayString": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.formatDayString; },
/* harmony export */ "formatIsoTimeString": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.formatIsoTimeString; },
/* harmony export */ "formatRange": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.formatRange; },
/* harmony export */ "getAllowYScrolling": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getAllowYScrolling; },
/* harmony export */ "getCanVGrowWithinCell": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getCanVGrowWithinCell; },
/* harmony export */ "getClippingParents": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getClippingParents; },
/* harmony export */ "getDateMeta": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getDateMeta; },
/* harmony export */ "getDayClassNames": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getDayClassNames; },
/* harmony export */ "getDefaultEventEnd": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getDefaultEventEnd; },
/* harmony export */ "getElRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getElRoot; },
/* harmony export */ "getElSeg": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getElSeg; },
/* harmony export */ "getEntrySpanEnd": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getEntrySpanEnd; },
/* harmony export */ "getEventClassNames": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getEventClassNames; },
/* harmony export */ "getEventTargetViaRoot": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getEventTargetViaRoot; },
/* harmony export */ "getIsRtlScrollbarOnLeft": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getIsRtlScrollbarOnLeft; },
/* harmony export */ "getRectCenter": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getRectCenter; },
/* harmony export */ "getRelevantEvents": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getRelevantEvents; },
/* harmony export */ "getScrollGridClassNames": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getScrollGridClassNames; },
/* harmony export */ "getScrollbarWidths": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getScrollbarWidths; },
/* harmony export */ "getSectionClassNames": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getSectionClassNames; },
/* harmony export */ "getSectionHasLiquidHeight": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getSectionHasLiquidHeight; },
/* harmony export */ "getSegAnchorAttrs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getSegAnchorAttrs; },
/* harmony export */ "getSegMeta": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getSegMeta; },
/* harmony export */ "getSlotClassNames": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getSlotClassNames; },
/* harmony export */ "getStickyFooterScrollbar": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getStickyFooterScrollbar; },
/* harmony export */ "getStickyHeaderDates": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getStickyHeaderDates; },
/* harmony export */ "getUnequalProps": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getUnequalProps; },
/* harmony export */ "getUniqueDomId": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.getUniqueDomId; },
/* harmony export */ "globalLocales": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.globalLocales; },
/* harmony export */ "globalPlugins": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.globalPlugins; },
/* harmony export */ "greatestDurationDenominator": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.greatestDurationDenominator; },
/* harmony export */ "groupIntersectingEntries": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.groupIntersectingEntries; },
/* harmony export */ "guid": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.guid; },
/* harmony export */ "hasBgRendering": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.hasBgRendering; },
/* harmony export */ "hasShrinkWidth": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.hasShrinkWidth; },
/* harmony export */ "identity": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.identity; },
/* harmony export */ "interactionSettingsStore": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.interactionSettingsStore; },
/* harmony export */ "interactionSettingsToStore": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.interactionSettingsToStore; },
/* harmony export */ "intersectRanges": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.intersectRanges; },
/* harmony export */ "intersectRects": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.intersectRects; },
/* harmony export */ "intersectSpans": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.intersectSpans; },
/* harmony export */ "isArraysEqual": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isArraysEqual; },
/* harmony export */ "isColPropsEqual": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isColPropsEqual; },
/* harmony export */ "isDateSelectionValid": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isDateSelectionValid; },
/* harmony export */ "isDateSpansEqual": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isDateSpansEqual; },
/* harmony export */ "isInt": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isInt; },
/* harmony export */ "isInteractionValid": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isInteractionValid; },
/* harmony export */ "isMultiDayRange": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isMultiDayRange; },
/* harmony export */ "isPropsEqual": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isPropsEqual; },
/* harmony export */ "isPropsValid": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isPropsValid; },
/* harmony export */ "isValidDate": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.isValidDate; },
/* harmony export */ "joinSpans": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.joinSpans; },
/* harmony export */ "listenBySelector": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.listenBySelector; },
/* harmony export */ "mapHash": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.mapHash; },
/* harmony export */ "memoize": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.memoize; },
/* harmony export */ "memoizeArraylike": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.memoizeArraylike; },
/* harmony export */ "memoizeHashlike": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.memoizeHashlike; },
/* harmony export */ "memoizeObjArg": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.memoizeObjArg; },
/* harmony export */ "mergeEventStores": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.mergeEventStores; },
/* harmony export */ "multiplyDuration": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.multiplyDuration; },
/* harmony export */ "padStart": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.padStart; },
/* harmony export */ "parseBusinessHours": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.parseBusinessHours; },
/* harmony export */ "parseClassNames": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.parseClassNames; },
/* harmony export */ "parseDragMeta": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.parseDragMeta; },
/* harmony export */ "parseEventDef": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.parseEventDef; },
/* harmony export */ "parseFieldSpecs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.parseFieldSpecs; },
/* harmony export */ "parseMarker": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.parseMarker; },
/* harmony export */ "pointInsideRect": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.pointInsideRect; },
/* harmony export */ "preventContextMenu": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.preventContextMenu; },
/* harmony export */ "preventDefault": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.preventDefault; },
/* harmony export */ "preventSelection": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.preventSelection; },
/* harmony export */ "rangeContainsMarker": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.rangeContainsMarker; },
/* harmony export */ "rangeContainsRange": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.rangeContainsRange; },
/* harmony export */ "rangesEqual": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.rangesEqual; },
/* harmony export */ "rangesIntersect": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.rangesIntersect; },
/* harmony export */ "refineEventDef": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.refineEventDef; },
/* harmony export */ "refineProps": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.refineProps; },
/* harmony export */ "removeElement": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.removeElement; },
/* harmony export */ "removeExact": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.removeExact; },
/* harmony export */ "render": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.render; },
/* harmony export */ "renderChunkContent": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.renderChunkContent; },
/* harmony export */ "renderFill": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.renderFill; },
/* harmony export */ "renderMicroColGroup": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.renderMicroColGroup; },
/* harmony export */ "renderScrollShim": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.renderScrollShim; },
/* harmony export */ "requestJson": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.requestJson; },
/* harmony export */ "sanitizeShrinkWidth": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.sanitizeShrinkWidth; },
/* harmony export */ "setElSeg": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.setElSeg; },
/* harmony export */ "setRef": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.setRef; },
/* harmony export */ "sliceEventStore": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.sliceEventStore; },
/* harmony export */ "sliceEvents": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.sliceEvents; },
/* harmony export */ "sortEventSegs": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.sortEventSegs; },
/* harmony export */ "startOfDay": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.startOfDay; },
/* harmony export */ "translateRect": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.translateRect; },
/* harmony export */ "triggerDateSelect": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.triggerDateSelect; },
/* harmony export */ "unmountComponentAtNode": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.unmountComponentAtNode; },
/* harmony export */ "unpromisify": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.unpromisify; },
/* harmony export */ "version": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.version; },
/* harmony export */ "whenTransitionDone": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.whenTransitionDone; },
/* harmony export */ "wholeDivideDurations": function() { return /* reexport safe */ _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.wholeDivideDurations; }
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _vdom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vdom */ "./node_modules/@fullcalendar/react/dist/vdom.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @fullcalendar/common */ "./node_modules/@fullcalendar/common/main.js");
var FullCalendar = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(FullCalendar, _super);
function FullCalendar() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._calendarApi = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarApi();
return _this;
}
FullCalendar.prototype.render = function () {
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarDataProvider, { optionOverrides: this.props, calendarApi: this._calendarApi }, function (data) { return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarRoot, { options: data.calendarOptions, theme: data.theme, emitter: data.emitter }, function (classNames, height, isHeightAuto, forPrint) { return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: classNames.join(' '), style: { height: height } },
react__WEBPACK_IMPORTED_MODULE_1__.createElement(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_2__.CalendarContent, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ isHeightAuto: isHeightAuto, forPrint: forPrint }, data)))); })); }));
};
FullCalendar.prototype.getApi = function () {
return this._calendarApi;
};
return FullCalendar;
}(react__WEBPACK_IMPORTED_MODULE_1__.Component));
/* harmony default export */ __webpack_exports__["default"] = (FullCalendar);
// export all important utils/types
//# sourceMappingURL=main.js.map
/***/ }),
/***/ "./node_modules/@fullcalendar/react/dist/vdom.js":
/*!*******************************************************!*\
!*** ./node_modules/@fullcalendar/react/dist/vdom.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "flushSync": function() { return /* binding */ flushSync; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
(typeof globalThis !== 'undefined' ? globalThis : window).FullCalendarVDom = {
Component: react__WEBPACK_IMPORTED_MODULE_0__.Component,
createElement: react__WEBPACK_IMPORTED_MODULE_0__.createElement,
render: react_dom__WEBPACK_IMPORTED_MODULE_1__.render,
createRef: react__WEBPACK_IMPORTED_MODULE_0__.createRef,
Fragment: react__WEBPACK_IMPORTED_MODULE_0__.Fragment,
createContext: react__WEBPACK_IMPORTED_MODULE_0__.createContext,
createPortal: react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal,
flushSync: flushSync,
unmountComponentAtNode: react_dom__WEBPACK_IMPORTED_MODULE_1__.unmountComponentAtNode // never called by FullCalendar's React component
};
function flushSync(callback) {
// always sync from top-level
callback();
}
//# sourceMappingURL=vdom.js.map
/***/ }),
/***/ "./node_modules/@fullcalendar/timegrid/main.js":
/*!*****************************************************!*\
!*** ./node_modules/@fullcalendar/timegrid/main.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DayTimeCols": function() { return /* binding */ DayTimeCols; },
/* harmony export */ "DayTimeColsSlicer": function() { return /* binding */ DayTimeColsSlicer; },
/* harmony export */ "DayTimeColsView": function() { return /* binding */ DayTimeColsView; },
/* harmony export */ "TimeCols": function() { return /* binding */ TimeCols; },
/* harmony export */ "TimeColsSlatsCoords": function() { return /* binding */ TimeColsSlatsCoords; },
/* harmony export */ "TimeColsView": function() { return /* binding */ TimeColsView; },
/* harmony export */ "buildDayRanges": function() { return /* binding */ buildDayRanges; },
/* harmony export */ "buildSlatMetas": function() { return /* binding */ buildSlatMetas; },
/* harmony export */ "buildTimeColsModel": function() { return /* binding */ buildTimeColsModel; }
/* harmony export */ });
/* harmony import */ var _main_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main.css */ "./node_modules/@fullcalendar/timegrid/main.css");
/* harmony import */ var _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @fullcalendar/common */ "./node_modules/@fullcalendar/common/main.js");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @fullcalendar/daygrid */ "./node_modules/@fullcalendar/daygrid/main.js");
/*!
FullCalendar v5.10.2
Docs & License: https://fullcalendar.io/
(c) 2021 Adam Shaw
*/
var AllDaySplitter = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(AllDaySplitter, _super);
function AllDaySplitter() {
return _super !== null && _super.apply(this, arguments) || this;
}
AllDaySplitter.prototype.getKeyInfo = function () {
return {
allDay: {},
timed: {},
};
};
AllDaySplitter.prototype.getKeysForDateSpan = function (dateSpan) {
if (dateSpan.allDay) {
return ['allDay'];
}
return ['timed'];
};
AllDaySplitter.prototype.getKeysForEventDef = function (eventDef) {
if (!eventDef.allDay) {
return ['timed'];
}
if ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.hasBgRendering)(eventDef)) {
return ['timed', 'allDay'];
}
return ['allDay'];
};
return AllDaySplitter;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Splitter));
var DEFAULT_SLAT_LABEL_FORMAT = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)({
hour: 'numeric',
minute: '2-digit',
omitZeroMinute: true,
meridiem: 'short',
});
function TimeColsAxisCell(props) {
var classNames = [
'fc-timegrid-slot',
'fc-timegrid-slot-label',
props.isLabeled ? 'fc-scrollgrid-shrink' : 'fc-timegrid-slot-minor',
];
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.ViewContextType.Consumer, null, function (context) {
if (!props.isLabeled) {
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { className: classNames.join(' '), "data-time": props.isoTimeStr }));
}
var dateEnv = context.dateEnv, options = context.options, viewApi = context.viewApi;
var labelFormat = // TODO: fully pre-parse
options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT :
Array.isArray(options.slotLabelFormat) ? (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)(options.slotLabelFormat[0]) :
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)(options.slotLabelFormat);
var hookProps = {
level: 0,
time: props.time,
date: dateEnv.toDate(props.date),
view: viewApi,
text: dateEnv.format(props.date, labelFormat),
};
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RenderHook, { hookProps: hookProps, classNames: options.slotLabelClassNames, content: options.slotLabelContent, defaultContent: renderInnerContent, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-time": props.isoTimeStr },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion", ref: innerElRef }, innerContent)))); }));
}));
}
function renderInnerContent(props) {
return props.text;
}
var TimeBodyAxis = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeBodyAxis, _super);
function TimeBodyAxis() {
return _super !== null && _super.apply(this, arguments) || this;
}
TimeBodyAxis.prototype.render = function () {
return this.props.slatMetas.map(function (slatMeta) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { key: slatMeta.key },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColsAxisCell, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, slatMeta)))); });
};
return TimeBodyAxis;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
var DEFAULT_WEEK_NUM_FORMAT = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)({ week: 'short' });
var AUTO_ALL_DAY_MAX_EVENT_ROWS = 5;
var TimeColsView = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColsView, _super);
function TimeColsView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.allDaySplitter = new AllDaySplitter(); // for use by subclasses
_this.headerElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.rootElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.scrollerElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.state = {
slatCoords: null,
};
_this.handleScrollTopRequest = function (scrollTop) {
var scrollerEl = _this.scrollerElRef.current;
if (scrollerEl) { // TODO: not sure how this could ever be null. weirdness with the reducer
scrollerEl.scrollTop = scrollTop;
}
};
/* Header Render Methods
------------------------------------------------------------------------------------------------------------------*/
_this.renderHeadAxis = function (rowKey, frameHeight) {
if (frameHeight === void 0) { frameHeight = ''; }
var options = _this.context.options;
var dateProfile = _this.props.dateProfile;
var range = dateProfile.renderRange;
var dayCnt = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.diffDays)(range.start, range.end);
var navLinkAttrs = (dayCnt === 1) // only do in day views (to avoid doing in week views that dont need it)
? (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildNavLinkAttrs)(_this.context, range.start, 'week')
: {};
if (options.weekNumbers && rowKey === 'day') {
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.WeekNumberRoot, { date: range.start, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", { ref: rootElRef, "aria-hidden": true, className: [
'fc-timegrid-axis',
'fc-scrollgrid-shrink',
].concat(classNames).join(' ') },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid", style: { height: frameHeight } },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ ref: innerElRef, className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner" }, navLinkAttrs), innerContent)))); }));
}
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("th", { "aria-hidden": true, className: "fc-timegrid-axis" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-axis-frame", style: { height: frameHeight } })));
};
/* Table Component Render Methods
------------------------------------------------------------------------------------------------------------------*/
// only a one-way height sync. we don't send the axis inner-content height to the DayGrid,
// but DayGrid still needs to have classNames on inner elements in order to measure.
_this.renderTableRowAxis = function (rowHeight) {
var _a = _this.context, options = _a.options, viewApi = _a.viewApi;
var hookProps = {
text: options.allDayText,
view: viewApi,
};
return (
// TODO: make reusable hook. used in list view too
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RenderHook, { hookProps: hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { ref: rootElRef, "aria-hidden": true, className: [
'fc-timegrid-axis',
'fc-scrollgrid-shrink',
].concat(classNames).join(' ') },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: 'fc-timegrid-axis-frame fc-scrollgrid-shrink-frame' + (rowHeight == null ? ' fc-timegrid-axis-frame-liquid' : ''), style: { height: rowHeight } },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner", ref: innerElRef }, innerContent)))); }));
};
_this.handleSlatCoords = function (slatCoords) {
_this.setState({ slatCoords: slatCoords });
};
return _this;
}
// rendering
// ----------------------------------------------------------------------------------------------------
TimeColsView.prototype.renderSimpleLayout = function (headerRowContent, allDayContent, timeContent) {
var _a = this, context = _a.context, props = _a.props;
var sections = [];
var stickyHeaderDates = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getStickyHeaderDates)(context.options);
if (headerRowContent) {
sections.push({
type: 'header',
key: 'header',
isSticky: stickyHeaderDates,
chunk: {
elRef: this.headerElRef,
tableClassName: 'fc-col-header',
rowContent: headerRowContent,
},
});
}
if (allDayContent) {
sections.push({
type: 'body',
key: 'all-day',
chunk: { content: allDayContent },
});
sections.push({
type: 'body',
key: 'all-day-divider',
outerContent: ( // TODO: rename to cellContent so don't need to define ?
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { role: "presentation", className: "fc-scrollgrid-section" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { className: 'fc-timegrid-divider ' + context.theme.getClass('tableCellShaded') }))),
});
}
sections.push({
type: 'body',
key: 'body',
liquid: true,
expandRows: Boolean(context.options.expandRows),
chunk: {
scrollerElRef: this.scrollerElRef,
content: timeContent,
},
});
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [{ width: 'shrink' }], sections: sections }))); }));
};
TimeColsView.prototype.renderHScrollLayout = function (headerRowContent, allDayContent, timeContent, colCnt, dayMinWidth, slatMetas, slatCoords) {
var _this = this;
var ScrollGrid = this.context.pluginHooks.scrollGridImpl;
if (!ScrollGrid) {
throw new Error('No ScrollGrid implementation');
}
var _a = this, context = _a.context, props = _a.props;
var stickyHeaderDates = !props.forPrint && (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getStickyHeaderDates)(context.options);
var stickyFooterScrollbar = !props.forPrint && (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getStickyFooterScrollbar)(context.options);
var sections = [];
if (headerRowContent) {
sections.push({
type: 'header',
key: 'header',
isSticky: stickyHeaderDates,
syncRowHeights: true,
chunks: [
{
key: 'axis',
rowContent: function (arg) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { role: "presentation" }, _this.renderHeadAxis('day', arg.rowSyncHeights[0]))); },
},
{
key: 'cols',
elRef: this.headerElRef,
tableClassName: 'fc-col-header',
rowContent: headerRowContent,
},
],
});
}
if (allDayContent) {
sections.push({
type: 'body',
key: 'all-day',
syncRowHeights: true,
chunks: [
{
key: 'axis',
rowContent: function (contentArg) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { role: "presentation" }, _this.renderTableRowAxis(contentArg.rowSyncHeights[0]))); },
},
{
key: 'cols',
content: allDayContent,
},
],
});
sections.push({
key: 'all-day-divider',
type: 'body',
outerContent: ( // TODO: rename to cellContent so don't need to define ?
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { role: "presentation", className: "fc-scrollgrid-section" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { colSpan: 2, className: 'fc-timegrid-divider ' + context.theme.getClass('tableCellShaded') }))),
});
}
var isNowIndicator = context.options.nowIndicator;
sections.push({
type: 'body',
key: 'body',
liquid: true,
expandRows: Boolean(context.options.expandRows),
chunks: [
{
key: 'axis',
content: function (arg) { return (
// TODO: make this now-indicator arrow more DRY with TimeColsContent
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-axis-chunk" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("table", { "aria-hidden": true, style: { height: arg.expandRows ? arg.clientHeight : '' } },
arg.tableColGroupNode,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tbody", null,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeBodyAxis, { slatMetas: slatMetas }))),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-now-indicator-container" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowTimer, { unit: isNowIndicator ? 'minute' : 'day' /* hacky */ }, function (nowDate) {
var nowIndicatorTop = isNowIndicator &&
slatCoords &&
slatCoords.safeComputeTop(nowDate); // might return void
if (typeof nowIndicatorTop === 'number') {
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowIndicatorRoot, { isAxis: true, date: nowDate }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: ['fc-timegrid-now-indicator-arrow'].concat(classNames).join(' '), style: { top: nowIndicatorTop } }, innerContent)); }));
}
return null;
})))); },
},
{
key: 'cols',
scrollerElRef: this.scrollerElRef,
content: timeContent,
},
],
});
if (stickyFooterScrollbar) {
sections.push({
key: 'footer',
type: 'footer',
isSticky: true,
chunks: [
{
key: 'axis',
content: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.renderScrollShim,
},
{
key: 'cols',
content: _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.renderScrollShim,
},
],
});
}
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [
{ width: 'shrink', cols: [{ width: 'shrink' }] },
{ cols: [{ span: colCnt, minWidth: dayMinWidth }] },
], sections: sections }))); }));
};
/* Dimensions
------------------------------------------------------------------------------------------------------------------*/
TimeColsView.prototype.getAllDayMaxEventProps = function () {
var _a = this.context.options, dayMaxEvents = _a.dayMaxEvents, dayMaxEventRows = _a.dayMaxEventRows;
if (dayMaxEvents === true || dayMaxEventRows === true) { // is auto?
dayMaxEvents = undefined;
dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS; // make sure "auto" goes to a real number
}
return { dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows };
};
return TimeColsView;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function renderAllDayInner(hookProps) {
return hookProps.text;
}
var TimeColsSlatsCoords = /** @class */ (function () {
function TimeColsSlatsCoords(positions, dateProfile, slotDuration) {
this.positions = positions;
this.dateProfile = dateProfile;
this.slotDuration = slotDuration;
}
TimeColsSlatsCoords.prototype.safeComputeTop = function (date) {
var dateProfile = this.dateProfile;
if ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.rangeContainsMarker)(dateProfile.currentRange, date)) {
var startOfDayDate = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.startOfDay)(date);
var timeMs = date.valueOf() - startOfDayDate.valueOf();
if (timeMs >= (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.asRoughMs)(dateProfile.slotMinTime) &&
timeMs < (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.asRoughMs)(dateProfile.slotMaxTime)) {
return this.computeTimeTop((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createDuration)(timeMs));
}
}
return null;
};
// Computes the top coordinate, relative to the bounds of the grid, of the given date.
// A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.
TimeColsSlatsCoords.prototype.computeDateTop = function (when, startOfDayDate) {
if (!startOfDayDate) {
startOfDayDate = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.startOfDay)(when);
}
return this.computeTimeTop((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createDuration)(when.valueOf() - startOfDayDate.valueOf()));
};
// Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).
// This is a makeshify way to compute the time-top. Assumes all slatMetas dates are uniform.
// Eventually allow computation with arbirary slat dates.
TimeColsSlatsCoords.prototype.computeTimeTop = function (duration) {
var _a = this, positions = _a.positions, dateProfile = _a.dateProfile;
var len = positions.els.length;
// floating-point value of # of slots covered
var slatCoverage = (duration.milliseconds - (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.asRoughMs)(dateProfile.slotMinTime)) / (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.asRoughMs)(this.slotDuration);
var slatIndex;
var slatRemainder;
// compute a floating-point number for how many slats should be progressed through.
// from 0 to number of slats (inclusive)
// constrained because slotMinTime/slotMaxTime might be customized.
slatCoverage = Math.max(0, slatCoverage);
slatCoverage = Math.min(len, slatCoverage);
// an integer index of the furthest whole slat
// from 0 to number slats (*exclusive*, so len-1)
slatIndex = Math.floor(slatCoverage);
slatIndex = Math.min(slatIndex, len - 1);
// how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.
// could be 1.0 if slatCoverage is covering *all* the slots
slatRemainder = slatCoverage - slatIndex;
return positions.tops[slatIndex] +
positions.getHeight(slatIndex) * slatRemainder;
};
return TimeColsSlatsCoords;
}());
var TimeColsSlatsBody = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColsSlatsBody, _super);
function TimeColsSlatsBody() {
return _super !== null && _super.apply(this, arguments) || this;
}
TimeColsSlatsBody.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
var options = context.options;
var slatElRefs = props.slatElRefs;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tbody", null, props.slatMetas.map(function (slatMeta, i) {
var hookProps = {
time: slatMeta.time,
date: context.dateEnv.toDate(slatMeta.date),
view: context.viewApi,
};
var classNames = [
'fc-timegrid-slot',
'fc-timegrid-slot-lane',
slatMeta.isLabeled ? '' : 'fc-timegrid-slot-minor',
];
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { key: slatMeta.key, ref: slatElRefs.createRef(slatMeta.key) },
props.axis && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColsAxisCell, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, slatMeta))),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RenderHook, { hookProps: hookProps, classNames: options.slotLaneClassNames, content: options.slotLaneContent, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-time": slatMeta.isoTimeStr }, innerContent)); })));
})));
};
return TimeColsSlatsBody;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
/*
for the horizontal "slats" that run width-wise. Has a time axis on a side. Depends on RTL.
*/
var TimeColsSlats = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColsSlats, _super);
function TimeColsSlats() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.rootElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.slatElRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap();
return _this;
}
TimeColsSlats.prototype.render = function () {
var _a = this, props = _a.props, context = _a.context;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: this.rootElRef, className: "fc-timegrid-slots" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("table", { "aria-hidden": true, className: context.theme.getClass('table'), style: {
minWidth: props.tableMinWidth,
width: props.clientWidth,
height: props.minHeight,
} },
props.tableColGroupNode /* relies on there only being a single for the axis */,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColsSlatsBody, { slatElRefs: this.slatElRefs, axis: props.axis, slatMetas: props.slatMetas }))));
};
TimeColsSlats.prototype.componentDidMount = function () {
this.updateSizing();
};
TimeColsSlats.prototype.componentDidUpdate = function () {
this.updateSizing();
};
TimeColsSlats.prototype.componentWillUnmount = function () {
if (this.props.onCoords) {
this.props.onCoords(null);
}
};
TimeColsSlats.prototype.updateSizing = function () {
var _a = this, context = _a.context, props = _a.props;
if (props.onCoords &&
props.clientWidth !== null // means sizing has stabilized
) {
var rootEl = this.rootElRef.current;
if (rootEl.offsetHeight) { // not hidden by css
props.onCoords(new TimeColsSlatsCoords(new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.PositionCache(this.rootElRef.current, collectSlatEls(this.slatElRefs.currentMap, props.slatMetas), false, true), this.props.dateProfile, context.options.slotDuration));
}
}
};
return TimeColsSlats;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function collectSlatEls(elMap, slatMetas) {
return slatMetas.map(function (slatMeta) { return elMap[slatMeta.key]; });
}
function splitSegsByCol(segs, colCnt) {
var segsByCol = [];
var i;
for (i = 0; i < colCnt; i += 1) {
segsByCol.push([]);
}
if (segs) {
for (i = 0; i < segs.length; i += 1) {
segsByCol[segs[i].col].push(segs[i]);
}
}
return segsByCol;
}
function splitInteractionByCol(ui, colCnt) {
var byRow = [];
if (!ui) {
for (var i = 0; i < colCnt; i += 1) {
byRow[i] = null;
}
}
else {
for (var i = 0; i < colCnt; i += 1) {
byRow[i] = {
affectedInstances: ui.affectedInstances,
isEvent: ui.isEvent,
segs: [],
};
}
for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) {
var seg = _a[_i];
byRow[seg.col].segs.push(seg);
}
}
return byRow;
}
var TimeColMoreLink = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColMoreLink, _super);
function TimeColMoreLink() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.rootElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
TimeColMoreLink.prototype.render = function () {
var _this = this;
var props = this.props;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.MoreLinkRoot, { allDayDate: null, moreCnt: props.hiddenSegs.length, allSegs: props.hiddenSegs, hiddenSegs: props.hiddenSegs, alignmentElRef: this.rootElRef, defaultContent: renderMoreLinkInner, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, todayRange: props.todayRange, popoverContent: function () { return renderPlainFgSegs(props.hiddenSegs, props); } }, function (rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { ref: function (el) {
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.setRef)(rootElRef, el);
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.setRef)(_this.rootElRef, el);
}, className: ['fc-timegrid-more-link'].concat(classNames).join(' '), style: { top: props.top, bottom: props.bottom }, onClick: handleClick, title: title, "aria-expanded": isExpanded, "aria-controls": popoverId },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: innerElRef, className: "fc-timegrid-more-link-inner fc-sticky" }, innerContent))); }));
};
return TimeColMoreLink;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function renderMoreLinkInner(props) {
return props.shortText;
}
// segInputs assumed sorted
function buildPositioning(segInputs, strictOrder, maxStackCnt) {
var hierarchy = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.SegHierarchy();
if (strictOrder != null) {
hierarchy.strictOrder = strictOrder;
}
if (maxStackCnt != null) {
hierarchy.maxStackCnt = maxStackCnt;
}
var hiddenEntries = hierarchy.addSegs(segInputs);
var hiddenGroups = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.groupIntersectingEntries)(hiddenEntries);
var web = buildWeb(hierarchy);
web = stretchWeb(web, 1); // all levelCoords/thickness will have 0.0-1.0
var segRects = webToRects(web);
return { segRects: segRects, hiddenGroups: hiddenGroups };
}
function buildWeb(hierarchy) {
var entriesByLevel = hierarchy.entriesByLevel;
var buildNode = cacheable(function (level, lateral) { return level + ':' + lateral; }, function (level, lateral) {
var siblingRange = findNextLevelSegs(hierarchy, level, lateral);
var nextLevelRes = buildNodes(siblingRange, buildNode);
var entry = entriesByLevel[level][lateral];
return [
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, entry), { nextLevelNodes: nextLevelRes[0] }),
entry.thickness + nextLevelRes[1], // the pressure builds
];
});
return buildNodes(entriesByLevel.length
? { level: 0, lateralStart: 0, lateralEnd: entriesByLevel[0].length }
: null, buildNode)[0];
}
function buildNodes(siblingRange, buildNode) {
if (!siblingRange) {
return [[], 0];
}
var level = siblingRange.level, lateralStart = siblingRange.lateralStart, lateralEnd = siblingRange.lateralEnd;
var lateral = lateralStart;
var pairs = [];
while (lateral < lateralEnd) {
pairs.push(buildNode(level, lateral));
lateral += 1;
}
pairs.sort(cmpDescPressures);
return [
pairs.map(extractNode),
pairs[0][1], // first item's pressure
];
}
function cmpDescPressures(a, b) {
return b[1] - a[1];
}
function extractNode(a) {
return a[0];
}
function findNextLevelSegs(hierarchy, subjectLevel, subjectLateral) {
var levelCoords = hierarchy.levelCoords, entriesByLevel = hierarchy.entriesByLevel;
var subjectEntry = entriesByLevel[subjectLevel][subjectLateral];
var afterSubject = levelCoords[subjectLevel] + subjectEntry.thickness;
var levelCnt = levelCoords.length;
var level = subjectLevel;
// skip past levels that are too high up
for (; level < levelCnt && levelCoords[level] < afterSubject; level += 1)
; // do nothing
for (; level < levelCnt; level += 1) {
var entries = entriesByLevel[level];
var entry = void 0;
var searchIndex = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.binarySearch)(entries, subjectEntry.span.start, _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getEntrySpanEnd);
var lateralStart = searchIndex[0] + searchIndex[1]; // if exact match (which doesn't collide), go to next one
var lateralEnd = lateralStart;
while ( // loop through entries that horizontally intersect
(entry = entries[lateralEnd]) && // but not past the whole seg list
entry.span.start < subjectEntry.span.end) {
lateralEnd += 1;
}
if (lateralStart < lateralEnd) {
return { level: level, lateralStart: lateralStart, lateralEnd: lateralEnd };
}
}
return null;
}
function stretchWeb(topLevelNodes, totalThickness) {
var stretchNode = cacheable(function (node, startCoord, prevThickness) { return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEntryKey)(node); }, function (node, startCoord, prevThickness) {
var nextLevelNodes = node.nextLevelNodes, thickness = node.thickness;
var allThickness = thickness + prevThickness;
var thicknessFraction = thickness / allThickness;
var endCoord;
var newChildren = [];
if (!nextLevelNodes.length) {
endCoord = totalThickness;
}
else {
for (var _i = 0, nextLevelNodes_1 = nextLevelNodes; _i < nextLevelNodes_1.length; _i++) {
var childNode = nextLevelNodes_1[_i];
if (endCoord === undefined) {
var res = stretchNode(childNode, startCoord, allThickness);
endCoord = res[0];
newChildren.push(res[1]);
}
else {
var res = stretchNode(childNode, endCoord, 0);
newChildren.push(res[1]);
}
}
}
var newThickness = (endCoord - startCoord) * thicknessFraction;
return [endCoord - newThickness, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, node), { thickness: newThickness, nextLevelNodes: newChildren })];
});
return topLevelNodes.map(function (node) { return stretchNode(node, 0, 0)[1]; });
}
// not sorted in any particular order
function webToRects(topLevelNodes) {
var rects = [];
var processNode = cacheable(function (node, levelCoord, stackDepth) { return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEntryKey)(node); }, function (node, levelCoord, stackDepth) {
var rect = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, node), { levelCoord: levelCoord,
stackDepth: stackDepth, stackForward: 0 });
rects.push(rect);
return (rect.stackForward = processNodes(node.nextLevelNodes, levelCoord + node.thickness, stackDepth + 1) + 1);
});
function processNodes(nodes, levelCoord, stackDepth) {
var stackForward = 0;
for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
var node = nodes_1[_i];
stackForward = Math.max(processNode(node, levelCoord, stackDepth), stackForward);
}
return stackForward;
}
processNodes(topLevelNodes, 0, 0);
return rects; // TODO: sort rects by levelCoord to be consistent with toRects?
}
// TODO: move to general util
function cacheable(keyFunc, workFunc) {
var cache = {};
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var key = keyFunc.apply(void 0, args);
return (key in cache)
? cache[key]
: (cache[key] = workFunc.apply(void 0, args));
};
}
function computeSegVCoords(segs, colDate, slatCoords, eventMinHeight) {
if (slatCoords === void 0) { slatCoords = null; }
if (eventMinHeight === void 0) { eventMinHeight = 0; }
var vcoords = [];
if (slatCoords) {
for (var i = 0; i < segs.length; i += 1) {
var seg = segs[i];
var spanStart = slatCoords.computeDateTop(seg.start, colDate);
var spanEnd = Math.max(spanStart + (eventMinHeight || 0), // :(
slatCoords.computeDateTop(seg.end, colDate));
vcoords.push({
start: Math.round(spanStart),
end: Math.round(spanEnd), //
});
}
}
return vcoords;
}
function computeFgSegPlacements(segs, segVCoords, // might not have for every seg
eventOrderStrict, eventMaxStack) {
var segInputs = [];
var dumbSegs = []; // segs without coords
for (var i = 0; i < segs.length; i += 1) {
var vcoords = segVCoords[i];
if (vcoords) {
segInputs.push({
index: i,
thickness: 1,
span: vcoords,
});
}
else {
dumbSegs.push(segs[i]);
}
}
var _a = buildPositioning(segInputs, eventOrderStrict, eventMaxStack), segRects = _a.segRects, hiddenGroups = _a.hiddenGroups;
var segPlacements = [];
for (var _i = 0, segRects_1 = segRects; _i < segRects_1.length; _i++) {
var segRect = segRects_1[_i];
segPlacements.push({
seg: segs[segRect.index],
rect: segRect,
});
}
for (var _b = 0, dumbSegs_1 = dumbSegs; _b < dumbSegs_1.length; _b++) {
var dumbSeg = dumbSegs_1[_b];
segPlacements.push({ seg: dumbSeg, rect: null });
}
return { segPlacements: segPlacements, hiddenGroups: hiddenGroups };
}
var DEFAULT_TIME_FORMAT = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createFormatter)({
hour: 'numeric',
minute: '2-digit',
meridiem: false,
});
var TimeColEvent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColEvent, _super);
function TimeColEvent() {
return _super !== null && _super.apply(this, arguments) || this;
}
TimeColEvent.prototype.render = function () {
var classNames = [
'fc-timegrid-event',
'fc-v-event',
];
if (this.props.isShort) {
classNames.push('fc-timegrid-event-short');
}
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.StandardEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, this.props, { defaultTimeFormat: DEFAULT_TIME_FORMAT, extraClassNames: classNames })));
};
return TimeColEvent;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
var TimeColMisc = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColMisc, _super);
function TimeColMisc() {
return _super !== null && _super.apply(this, arguments) || this;
}
TimeColMisc.prototype.render = function () {
var props = this.props;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function (innerElRef, innerContent) { return (innerContent &&
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-col-misc", ref: innerElRef }, innerContent)); }));
};
return TimeColMisc;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
var TimeCol = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeCol, _super);
function TimeCol() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.sortEventSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.sortEventSegs);
return _this;
}
// TODO: memoize event-placement?
TimeCol.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var isSelectMirror = context.options.selectMirror;
var mirrorSegs = (props.eventDrag && props.eventDrag.segs) ||
(props.eventResize && props.eventResize.segs) ||
(isSelectMirror && props.dateSelectionSegs) ||
[];
var interactionAffectedInstances = // TODO: messy way to compute this
(props.eventDrag && props.eventDrag.affectedInstances) ||
(props.eventResize && props.eventResize.affectedInstances) ||
{};
var sortedFgSegs = this.sortEventSegs(props.fgEventSegs, context.options.eventOrder);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayCellRoot, { elRef: props.elRef, date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function (rootElRef, classNames, dataAttrs) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ ref: rootElRef, role: "gridcell", className: ['fc-timegrid-col'].concat(classNames, props.extraClassNames || []).join(' ') }, dataAttrs, props.extraDataAttrs),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-col-frame" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-col-bg" },
_this.renderFillSegs(props.businessHourSegs, 'non-business'),
_this.renderFillSegs(props.bgEventSegs, 'bg-event'),
_this.renderFillSegs(props.dateSelectionSegs, 'highlight')),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-col-events" }, _this.renderFgSegs(sortedFgSegs, interactionAffectedInstances, false, false, false)),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-col-events" }, _this.renderFgSegs(mirrorSegs, {}, Boolean(props.eventDrag), Boolean(props.eventResize), Boolean(isSelectMirror))),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-now-indicator-container" }, _this.renderNowIndicator(props.nowIndicatorSegs)),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColMisc, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps })))); }));
};
TimeCol.prototype.renderFgSegs = function (sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting) {
var props = this.props;
if (props.forPrint) {
return renderPlainFgSegs(sortedFgSegs, props);
}
return this.renderPositionedFgSegs(sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting);
};
TimeCol.prototype.renderPositionedFgSegs = function (segs, // if not mirror, needs to be sorted
segIsInvisible, isDragging, isResizing, isDateSelecting) {
var _this = this;
var _a = this.context.options, eventMaxStack = _a.eventMaxStack, eventShortHeight = _a.eventShortHeight, eventOrderStrict = _a.eventOrderStrict, eventMinHeight = _a.eventMinHeight;
var _b = this.props, date = _b.date, slatCoords = _b.slatCoords, eventSelection = _b.eventSelection, todayRange = _b.todayRange, nowDate = _b.nowDate;
var isMirror = isDragging || isResizing || isDateSelecting;
var segVCoords = computeSegVCoords(segs, date, slatCoords, eventMinHeight);
var _c = computeFgSegPlacements(segs, segVCoords, eventOrderStrict, eventMaxStack), segPlacements = _c.segPlacements, hiddenGroups = _c.hiddenGroups;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
this.renderHiddenGroups(hiddenGroups, segs),
segPlacements.map(function (segPlacement) {
var seg = segPlacement.seg, rect = segPlacement.rect;
var instanceId = seg.eventRange.instance.instanceId;
var isVisible = isMirror || Boolean(!segIsInvisible[instanceId] && rect);
var vStyle = computeSegVStyle(rect && rect.span);
var hStyle = (!isMirror && rect) ? _this.computeSegHStyle(rect) : { left: 0, right: 0 };
var isInset = Boolean(rect) && rect.stackForward > 0;
var isShort = Boolean(rect) && (rect.span.end - rect.span.start) < eventShortHeight; // look at other places for this problem
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: 'fc-timegrid-event-harness' +
(isInset ? ' fc-timegrid-event-harness-inset' : ''), key: instanceId, style: (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ visibility: isVisible ? '' : 'hidden' }, vStyle), hStyle) },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, isShort: isShort }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, todayRange, nowDate)))));
})));
};
// will already have eventMinHeight applied because segInputs already had it
TimeCol.prototype.renderHiddenGroups = function (hiddenGroups, segs) {
var _a = this.props, extraDateSpan = _a.extraDateSpan, dateProfile = _a.dateProfile, todayRange = _a.todayRange, nowDate = _a.nowDate, eventSelection = _a.eventSelection, eventDrag = _a.eventDrag, eventResize = _a.eventResize;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, hiddenGroups.map(function (hiddenGroup) {
var positionCss = computeSegVStyle(hiddenGroup.span);
var hiddenSegs = compileSegsFromEntries(hiddenGroup.entries, segs);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColMoreLink, { key: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildIsoString)((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.computeEarliestSegStart)(hiddenSegs)), hiddenSegs: hiddenSegs, top: positionCss.top, bottom: positionCss.bottom, extraDateSpan: extraDateSpan, dateProfile: dateProfile, todayRange: todayRange, nowDate: nowDate, eventSelection: eventSelection, eventDrag: eventDrag, eventResize: eventResize }));
})));
};
TimeCol.prototype.renderFillSegs = function (segs, fillType) {
var _a = this, props = _a.props, context = _a.context;
var segVCoords = computeSegVCoords(segs, props.date, props.slatCoords, context.options.eventMinHeight); // don't assume all populated
var children = segVCoords.map(function (vcoords, i) {
var seg = segs[i];
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.buildEventRangeKey)(seg.eventRange), className: "fc-timegrid-bg-harness", style: computeSegVStyle(vcoords) }, fillType === 'bg-event' ?
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BgEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ seg: seg }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, props.todayRange, props.nowDate))) :
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.renderFill)(fillType)));
});
return (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children);
};
TimeCol.prototype.renderNowIndicator = function (segs) {
var _a = this.props, slatCoords = _a.slatCoords, date = _a.date;
if (!slatCoords) {
return null;
}
return segs.map(function (seg, i) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowIndicatorRoot, { isAxis: false, date: date,
// key doesn't matter. will only ever be one
key: i }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: ['fc-timegrid-now-indicator-line'].concat(classNames).join(' '), style: { top: slatCoords.computeDateTop(seg.start, date) } }, innerContent)); })); });
};
TimeCol.prototype.computeSegHStyle = function (segHCoords) {
var _a = this.context, isRtl = _a.isRtl, options = _a.options;
var shouldOverlap = options.slotEventOverlap;
var nearCoord = segHCoords.levelCoord; // the left side if LTR. the right side if RTL. floating-point
var farCoord = segHCoords.levelCoord + segHCoords.thickness; // the right side if LTR. the left side if RTL. floating-point
var left; // amount of space from left edge, a fraction of the total width
var right; // amount of space from right edge, a fraction of the total width
if (shouldOverlap) {
// double the width, but don't go beyond the maximum forward coordinate (1.0)
farCoord = Math.min(1, nearCoord + (farCoord - nearCoord) * 2);
}
if (isRtl) {
left = 1 - farCoord;
right = nearCoord;
}
else {
left = nearCoord;
right = 1 - farCoord;
}
var props = {
zIndex: segHCoords.stackDepth + 1,
left: left * 100 + '%',
right: right * 100 + '%',
};
if (shouldOverlap && !segHCoords.stackForward) {
// add padding to the edge so that forward stacked events don't cover the resizer's icon
props[isRtl ? 'marginLeft' : 'marginRight'] = 10 * 2; // 10 is a guesstimate of the icon's width
}
return props;
};
return TimeCol;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function renderPlainFgSegs(sortedFgSegs, _a) {
var todayRange = _a.todayRange, nowDate = _a.nowDate, eventSelection = _a.eventSelection, eventDrag = _a.eventDrag, eventResize = _a.eventResize;
var hiddenInstances = (eventDrag ? eventDrag.affectedInstances : null) ||
(eventResize ? eventResize.affectedInstances : null) ||
{};
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, sortedFgSegs.map(function (seg) {
var instanceId = seg.eventRange.instance.instanceId;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: instanceId, style: { visibility: hiddenInstances[instanceId] ? 'hidden' : '' } },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColEvent, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === eventSelection, isShort: false }, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.getSegMeta)(seg, todayRange, nowDate)))));
})));
}
function computeSegVStyle(segVCoords) {
if (!segVCoords) {
return { top: '', bottom: '' };
}
return {
top: segVCoords.start,
bottom: -segVCoords.end,
};
}
function compileSegsFromEntries(segEntries, allSegs) {
return segEntries.map(function (segEntry) { return allSegs[segEntry.index]; });
}
var TimeColsContent = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeColsContent, _super);
function TimeColsContent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.splitFgEventSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByCol);
_this.splitBgEventSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByCol);
_this.splitBusinessHourSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByCol);
_this.splitNowIndicatorSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByCol);
_this.splitDateSelectionSegs = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitSegsByCol);
_this.splitEventDrag = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitInteractionByCol);
_this.splitEventResize = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(splitInteractionByCol);
_this.rootElRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
_this.cellElRefs = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.RefMap();
return _this;
}
TimeColsContent.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var nowIndicatorTop = context.options.nowIndicator &&
props.slatCoords &&
props.slatCoords.safeComputeTop(props.nowDate); // might return void
var colCnt = props.cells.length;
var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, colCnt);
var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, colCnt);
var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, colCnt);
var nowIndicatorSegsByRow = this.splitNowIndicatorSegs(props.nowIndicatorSegs, colCnt);
var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, colCnt);
var eventDragByRow = this.splitEventDrag(props.eventDrag, colCnt);
var eventResizeByRow = this.splitEventResize(props.eventResize, colCnt);
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-cols", ref: this.rootElRef },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("table", { role: "presentation", style: {
minWidth: props.tableMinWidth,
width: props.clientWidth,
} },
props.tableColGroupNode,
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tbody", { role: "presentation" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("tr", { role: "row" },
props.axis && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("td", { "aria-hidden": true, className: "fc-timegrid-col fc-timegrid-axis" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-col-frame" },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-now-indicator-container" }, typeof nowIndicatorTop === 'number' && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowIndicatorRoot, { isAxis: true, date: props.nowDate }, function (rootElRef, classNames, innerElRef, innerContent) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { ref: rootElRef, className: ['fc-timegrid-now-indicator-arrow'].concat(classNames).join(' '), style: { top: nowIndicatorTop } }, innerContent)); })))))),
props.cells.map(function (cell, i) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeCol, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), dateProfile: props.dateProfile, date: cell.date, nowDate: props.nowDate, todayRange: props.todayRange, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, fgEventSegs: fgEventSegsByRow[i], bgEventSegs: bgEventSegsByRow[i], businessHourSegs: businessHourSegsByRow[i], nowIndicatorSegs: nowIndicatorSegsByRow[i], dateSelectionSegs: dateSelectionSegsByRow[i], eventDrag: eventDragByRow[i], eventResize: eventResizeByRow[i], slatCoords: props.slatCoords, eventSelection: props.eventSelection, forPrint: props.forPrint })); }))))));
};
TimeColsContent.prototype.componentDidMount = function () {
this.updateCoords();
};
TimeColsContent.prototype.componentDidUpdate = function () {
this.updateCoords();
};
TimeColsContent.prototype.updateCoords = function () {
var props = this.props;
if (props.onColCoords &&
props.clientWidth !== null // means sizing has stabilized
) {
props.onColCoords(new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.PositionCache(this.rootElRef.current, collectCellEls(this.cellElRefs.currentMap, props.cells), true, // horizontal
false));
}
};
return TimeColsContent;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.BaseComponent));
function collectCellEls(elMap, cells) {
return cells.map(function (cell) { return elMap[cell.key]; });
}
/* A component that renders one or more columns of vertical time slots
----------------------------------------------------------------------------------------------------------------------*/
var TimeCols = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(TimeCols, _super);
function TimeCols() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.processSlotOptions = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(processSlotOptions);
_this.state = {
slatCoords: null,
};
_this.handleRootEl = function (el) {
if (el) {
_this.context.registerInteractiveComponent(_this, {
el: el,
isHitComboAllowed: _this.props.isHitComboAllowed,
});
}
else {
_this.context.unregisterInteractiveComponent(_this);
}
};
_this.handleScrollRequest = function (request) {
var onScrollTopRequest = _this.props.onScrollTopRequest;
var slatCoords = _this.state.slatCoords;
if (onScrollTopRequest && slatCoords) {
if (request.time) {
var top_1 = slatCoords.computeTimeTop(request.time);
top_1 = Math.ceil(top_1); // zoom can give weird floating-point values. rather scroll a little bit further
if (top_1) {
top_1 += 1; // to overcome top border that slots beyond the first have. looks better
}
onScrollTopRequest(top_1);
}
return true;
}
return false;
};
_this.handleColCoords = function (colCoords) {
_this.colCoords = colCoords;
};
_this.handleSlatCoords = function (slatCoords) {
_this.setState({ slatCoords: slatCoords });
if (_this.props.onSlatCoords) {
_this.props.onSlatCoords(slatCoords);
}
};
return _this;
}
TimeCols.prototype.render = function () {
var _a = this, props = _a.props, state = _a.state;
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fc-timegrid-body", ref: this.handleRootEl, style: {
// these props are important to give this wrapper correct dimensions for interactions
// TODO: if we set it here, can we avoid giving to inner tables?
width: props.clientWidth,
minWidth: props.tableMinWidth,
} },
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColsSlats, { axis: props.axis, dateProfile: props.dateProfile, slatMetas: props.slatMetas, clientWidth: props.clientWidth, minHeight: props.expandRows ? props.clientHeight : '', tableMinWidth: props.tableMinWidth, tableColGroupNode: props.axis ? props.tableColGroupNode : null /* axis depends on the colgroup's shrinking */, onCoords: this.handleSlatCoords }),
(0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeColsContent, { cells: props.cells, axis: props.axis, dateProfile: props.dateProfile, businessHourSegs: props.businessHourSegs, bgEventSegs: props.bgEventSegs, fgEventSegs: props.fgEventSegs, dateSelectionSegs: props.dateSelectionSegs, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange, nowDate: props.nowDate, nowIndicatorSegs: props.nowIndicatorSegs, clientWidth: props.clientWidth, tableMinWidth: props.tableMinWidth, tableColGroupNode: props.tableColGroupNode, slatCoords: state.slatCoords, onColCoords: this.handleColCoords, forPrint: props.forPrint })));
};
TimeCols.prototype.componentDidMount = function () {
this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest);
};
TimeCols.prototype.componentDidUpdate = function (prevProps) {
this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile);
};
TimeCols.prototype.componentWillUnmount = function () {
this.scrollResponder.detach();
};
TimeCols.prototype.queryHit = function (positionLeft, positionTop) {
var _a = this.context, dateEnv = _a.dateEnv, options = _a.options;
var colCoords = this.colCoords;
var dateProfile = this.props.dateProfile;
var slatCoords = this.state.slatCoords;
var _b = this.processSlotOptions(this.props.slotDuration, options.snapDuration), snapDuration = _b.snapDuration, snapsPerSlot = _b.snapsPerSlot;
var colIndex = colCoords.leftToIndex(positionLeft);
var slatIndex = slatCoords.positions.topToIndex(positionTop);
if (colIndex != null && slatIndex != null) {
var cell = this.props.cells[colIndex];
var slatTop = slatCoords.positions.tops[slatIndex];
var slatHeight = slatCoords.positions.getHeight(slatIndex);
var partial = (positionTop - slatTop) / slatHeight; // floating point number between 0 and 1
var localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat
var snapIndex = slatIndex * snapsPerSlot + localSnapIndex;
var dayDate = this.props.cells[colIndex].date;
var time = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDurations)(dateProfile.slotMinTime, (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.multiplyDuration)(snapDuration, snapIndex));
var start = dateEnv.add(dayDate, time);
var end = dateEnv.add(start, snapDuration);
return {
dateProfile: dateProfile,
dateSpan: (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ range: { start: start, end: end }, allDay: false }, cell.extraDateSpan),
dayEl: colCoords.els[colIndex],
rect: {
left: colCoords.lefts[colIndex],
right: colCoords.rights[colIndex],
top: slatTop,
bottom: slatTop + slatHeight,
},
layer: 0,
};
}
return null;
};
return TimeCols;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function processSlotOptions(slotDuration, snapDurationOverride) {
var snapDuration = snapDurationOverride || slotDuration;
var snapsPerSlot = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.wholeDivideDurations)(slotDuration, snapDuration);
if (snapsPerSlot === null) {
snapDuration = slotDuration;
snapsPerSlot = 1;
// TODO: say warning?
}
return { snapDuration: snapDuration, snapsPerSlot: snapsPerSlot };
}
var DayTimeColsSlicer = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(DayTimeColsSlicer, _super);
function DayTimeColsSlicer() {
return _super !== null && _super.apply(this, arguments) || this;
}
DayTimeColsSlicer.prototype.sliceRange = function (range, dayRanges) {
var segs = [];
for (var col = 0; col < dayRanges.length; col += 1) {
var segRange = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.intersectRanges)(range, dayRanges[col]);
if (segRange) {
segs.push({
start: segRange.start,
end: segRange.end,
isStart: segRange.start.valueOf() === range.start.valueOf(),
isEnd: segRange.end.valueOf() === range.end.valueOf(),
col: col,
});
}
}
return segs;
};
return DayTimeColsSlicer;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.Slicer));
var DayTimeCols = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(DayTimeCols, _super);
function DayTimeCols() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildDayRanges = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(buildDayRanges);
_this.slicer = new DayTimeColsSlicer();
_this.timeColsRef = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createRef)();
return _this;
}
DayTimeCols.prototype.render = function () {
var _this = this;
var _a = this, props = _a.props, context = _a.context;
var dateProfile = props.dateProfile, dayTableModel = props.dayTableModel;
var isNowIndicator = context.options.nowIndicator;
var dayRanges = this.buildDayRanges(dayTableModel, dateProfile, context.dateEnv);
// give it the first row of cells
// TODO: would move this further down hierarchy, but sliceNowDate needs it
return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.NowTimer, { unit: isNowIndicator ? 'minute' : 'day' }, function (nowDate, todayRange) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(TimeCols, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ ref: _this.timeColsRef }, _this.slicer.sliceProps(props, dateProfile, null, context, dayRanges), { forPrint: props.forPrint, axis: props.axis, dateProfile: dateProfile, slatMetas: props.slatMetas, slotDuration: props.slotDuration, cells: dayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate: nowDate, nowIndicatorSegs: isNowIndicator && _this.slicer.sliceNowDate(nowDate, context, dayRanges), todayRange: todayRange, onScrollTopRequest: props.onScrollTopRequest, onSlatCoords: props.onSlatCoords }))); }));
};
return DayTimeCols;
}(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DateComponent));
function buildDayRanges(dayTableModel, dateProfile, dateEnv) {
var ranges = [];
for (var _i = 0, _a = dayTableModel.headerDates; _i < _a.length; _i++) {
var date = _a[_i];
ranges.push({
start: dateEnv.add(date, dateProfile.slotMinTime),
end: dateEnv.add(date, dateProfile.slotMaxTime),
});
}
return ranges;
}
// potential nice values for the slot-duration and interval-duration
// from largest to smallest
var STOCK_SUB_DURATIONS = [
{ hours: 1 },
{ minutes: 30 },
{ minutes: 15 },
{ seconds: 30 },
{ seconds: 15 },
];
function buildSlatMetas(slotMinTime, slotMaxTime, explicitLabelInterval, slotDuration, dateEnv) {
var dayStart = new Date(0);
var slatTime = slotMinTime;
var slatIterator = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createDuration)(0);
var labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration);
var metas = [];
while ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.asRoughMs)(slatTime) < (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.asRoughMs)(slotMaxTime)) {
var date = dateEnv.add(dayStart, slatTime);
var isLabeled = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.wholeDivideDurations)(slatIterator, labelInterval) !== null;
metas.push({
date: date,
time: slatTime,
key: date.toISOString(),
isoTimeStr: (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.formatIsoTimeString)(date),
isLabeled: isLabeled,
});
slatTime = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDurations)(slatTime, slotDuration);
slatIterator = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.addDurations)(slatIterator, slotDuration);
}
return metas;
}
// Computes an automatic value for slotLabelInterval
function computeLabelInterval(slotDuration) {
var i;
var labelInterval;
var slotsPerLabel;
// find the smallest stock label interval that results in more than one slots-per-label
for (i = STOCK_SUB_DURATIONS.length - 1; i >= 0; i -= 1) {
labelInterval = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createDuration)(STOCK_SUB_DURATIONS[i]);
slotsPerLabel = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.wholeDivideDurations)(labelInterval, slotDuration);
if (slotsPerLabel !== null && slotsPerLabel > 1) {
return labelInterval;
}
}
return slotDuration; // fall back
}
var DayTimeColsView = /** @class */ (function (_super) {
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(DayTimeColsView, _super);
function DayTimeColsView() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.buildTimeColsModel = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(buildTimeColsModel);
_this.buildSlatMetas = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.memoize)(buildSlatMetas);
return _this;
}
DayTimeColsView.prototype.render = function () {
var _this = this;
var _a = this.context, options = _a.options, dateEnv = _a.dateEnv, dateProfileGenerator = _a.dateProfileGenerator;
var props = this.props;
var dateProfile = props.dateProfile;
var dayTableModel = this.buildTimeColsModel(dateProfile, dateProfileGenerator);
var splitProps = this.allDaySplitter.splitProps(props);
var slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv);
var dayMinWidth = options.dayMinWidth;
var hasAttachedAxis = !dayMinWidth;
var hasDetachedAxis = dayMinWidth;
var headerContent = options.dayHeaders && ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayHeader, { dates: dayTableModel.headerDates, dateProfile: dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }));
var allDayContent = (options.allDaySlot !== false) && (function (contentArg) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(_fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_2__.DayTable, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, splitProps.allDay, { dateProfile: dateProfile, dayTableModel: dayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? _this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, _this.getAllDayMaxEventProps()))); });
var timeGridContent = function (contentArg) { return ((0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createElement)(DayTimeCols, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, splitProps.timed, { dayTableModel: dayTableModel, dateProfile: dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas: slatMetas, forPrint: props.forPrint, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: _this.handleSlatCoords, expandRows: contentArg.expandRows, onScrollTopRequest: _this.handleScrollTopRequest }))); };
return hasDetachedAxis
? this.renderHScrollLayout(headerContent, allDayContent, timeGridContent, dayTableModel.colCnt, dayMinWidth, slatMetas, this.state.slatCoords)
: this.renderSimpleLayout(headerContent, allDayContent, timeGridContent);
};
return DayTimeColsView;
}(TimeColsView));
function buildTimeColsModel(dateProfile, dateProfileGenerator) {
var daySeries = new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);
return new _fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.DayTableModel(daySeries, false);
}
var OPTION_REFINERS = {
allDaySlot: Boolean,
};
var main = (0,_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__.createPlugin)({
initialView: 'timeGridWeek',
optionRefiners: OPTION_REFINERS,
views: {
timeGrid: {
component: DayTimeColsView,
usesMinMaxTime: true,
allDaySlot: true,
slotDuration: '00:30:00',
slotEventOverlap: true, // a bad name. confused with overlap/constraint system
},
timeGridDay: {
type: 'timeGrid',
duration: { days: 1 },
},
timeGridWeek: {
type: 'timeGrid',
duration: { weeks: 1 },
},
},
});
/* harmony default export */ __webpack_exports__["default"] = (main);
//# sourceMappingURL=main.js.map
/***/ }),
/***/ "./src/Components/CategoryDropdownFilter.js":
/*!**************************************************!*\
!*** ./src/Components/CategoryDropdownFilter.js ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
const CategoryDropdownFilter = () => {
const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_2__.EventContex);
const {
category,
inputHandler,
shortcodeData
} = context;
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("select", {
name: "select",
onChange: inputHandler
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", {
value: ""
}, " ", shortcodeData.select_cat_text), category.length > 0 && category.map((value, key) => {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", {
value: value,
key: key
}, value);
}));
};
/* harmony default export */ __webpack_exports__["default"] = (CategoryDropdownFilter);
/***/ }),
/***/ "./src/Components/CategoryRadioFilterList.js":
/*!***************************************************!*\
!*** ./src/Components/CategoryRadioFilterList.js ***!
\***************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
const CategoryRadioFilterList = () => {
const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_2__.EventContex);
const {
category,
inputHandler,
shortcodeData
} = context;
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "cat-radio-btn-list"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", {
className: "etn-cal-selected-date"
}, shortcodeData.select_cat_text), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "radio-field-group"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
type: "radio",
name: "radio",
value: "",
id: "catlists1",
onChange: inputHandler
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
for: "catlists1"
}, shortcodeData.select_cat_text, " ")), category.length > 0 && category.map((value, key) => {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "radio-field-group"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
type: "radio",
name: "radio",
value: value,
id: "catlist" + key,
onChange: inputHandler
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
for: "catlist" + key
}, value));
}));
};
/* harmony default export */ __webpack_exports__["default"] = (CategoryRadioFilterList);
/***/ }),
/***/ "./src/Components/Content.js":
/*!***********************************!*\
!*** ./src/Components/Content.js ***!
\***********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ Content; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers */ "./src/helpers/index.js");
function Content(_ref) {
let {
data
} = _ref;
const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_2__.EventContex);
const {
shortcodeData
} = context;
const desc = (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.truncate)(data.description);
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-content"
}, data.location && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-location"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
className: "fas fa-map-marker-alt"
}), data.location), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", {
className: "etn-title etn-event-title"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
href: data.url,
dangerouslySetInnerHTML: {
__html: data.title
}
})), shortcodeData.show_desc == 'yes' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
dangerouslySetInnerHTML: {
__html: desc
}
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-price",
dangerouslySetInnerHTML: {
__html: data.price
}
}));
}
/***/ }),
/***/ "./src/Components/EtnCalendar.js":
/*!***************************************!*\
!*** ./src/Components/EtnCalendar.js ***!
\***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ EtnCalendar; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _fullcalendar_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @fullcalendar/react */ "./node_modules/@fullcalendar/react/dist/main.js");
/* harmony import */ var _fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @fullcalendar/daygrid */ "./node_modules/@fullcalendar/daygrid/main.js");
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
function EtnCalendar() {
const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_4__.EventContex);
const {
calendarEvents,
getMonth,
dayClickHandle,
localeName,
start_of_week
} = context;
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-default-calendar-style"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_fullcalendar_react__WEBPACK_IMPORTED_MODULE_2__["default"], {
plugins: [_fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_3__["default"]],
headerToolbar: {
left: 'prev',
center: 'title',
right: 'next'
},
initialView: "dayGridMonth",
navLinks: true,
events: calendarEvents,
height: "auto",
datesSet: getMonth,
navLinkDayClick: dayClickHandle,
locale: localeName,
firstDay: start_of_week
}));
}
/***/ }),
/***/ "./src/Components/EventStyle/EventStyle1.js":
/*!**************************************************!*\
!*** ./src/Components/EventStyle/EventStyle1.js ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ EventStyle1; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Thumbnail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Thumbnail */ "./src/Components/Thumbnail.js");
/* harmony import */ var _Content__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Content */ "./src/Components/Content.js");
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../context/DataProvider */ "./src/context/DataProvider.js");
function EventStyle1() {
const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_4__.EventContex);
const {
eventFilter,
shortcodeData
} = context;
return eventFilter.length > 0 ? eventFilter.slice(0, shortcodeData.limit).map((value, index) => {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
key: index,
className: "etn-row etn-event-item etn-fadeInUp"
}, value.thumbnail != false ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-md-4"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Thumbnail__WEBPACK_IMPORTED_MODULE_2__["default"], {
data: value
})) : '', (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-md-8 etn-align-self-center"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Content__WEBPACK_IMPORTED_MODULE_3__["default"], {
data: value
})));
}) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
className: "etn-not-found-post"
}, " ", shortcodeData.event_notice, " ");
}
/***/ }),
/***/ "./src/Components/Thumbnail.js":
/*!*************************************!*\
!*** ./src/Components/Thumbnail.js ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ Thumbnail; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
function Thumbnail(_ref) {
let {
data
} = _ref;
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-thumb"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
href: data.url
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: data.thumbnail,
alt: data.title
})));
}
/***/ }),
/***/ "./src/Widgets/EventCalendarClassic.js":
/*!*********************************************!*\
!*** ./src/Widgets/EventCalendarClassic.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ EventCalendarClassic; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Components_EtnCalendar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Components/EtnCalendar */ "./src/Components/EtnCalendar.js");
/* harmony import */ var moment_moment_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! moment/moment.js */ "./node_modules/moment/moment.js");
/* harmony import */ var moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment_moment_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _Components_CategoryDropdownFilter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Components/CategoryDropdownFilter */ "./src/Components/CategoryDropdownFilter.js");
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
/* harmony import */ var _Components_EventStyle_EventStyle1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Components/EventStyle/EventStyle1 */ "./src/Components/EventStyle/EventStyle1.js");
/* harmony import */ var _Components_CategoryRadioFilterList__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Components/CategoryRadioFilterList */ "./src/Components/CategoryRadioFilterList.js");
/* harmony import */ var _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../assets/images/loader.gif */ "./assets/images/loader.gif");
function EventCalendarClassic(_ref) {
let {
dataCat,
dataControls
} = _ref;
var today = moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(new Date()).format('YYYY-MM-DD');
var currentMonth = moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(new Date()).format('MM');
var currentYear = moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(new Date()).format('YYYY');
const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
const [isLoaded, setIsLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
const [loader, setLoader] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
const [items, setItems] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
const [getClickDate, setClickDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(today);
const [selectItem, setSelectItem] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');
const [month, setMonth] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentMonth);
const [getYear, setYear] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentYear);
const [shortcodeData, setShortcodeData] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
const json_data = JSON.parse(dataControls);
const cat_json_data = JSON.parse(dataCat);
const site_url = localized_data_obj.site_url;
const localeName = localized_data_obj.locale_name;
const start_of_week = localized_data_obj.start_of_week;
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
setLoader(false);
fetch(`${site_url}/wp-json/eventin/v1/event/events?month=${month}&year=${getYear}&display=background&endDate=false&startTime=false`).then(res => res.json()).then(result => {
setLoader(true);
setIsLoaded(true);
setItems(result.content);
setShortcodeData(json_data);
}, error => {
setIsLoaded(false);
setLoader(false);
setError(error);
});
}, [month, getYear]);
const getMonthYear = arg => {
setMonth(moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(arg.view.currentStart).format('MM'));
setYear(moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(arg.view.currentStart).format('YYYY'));
jQuery('.fc-day-today .fc-daygrid-day-number').addClass("fc-state-highlight");
}; // event day click and get date
const dayClickHandle = (date, jsEvent) => {
jQuery(".fc-state-highlight").removeClass("fc-state-highlight");
setClickDate(moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(date).format('YYYY-MM-DD'));
jQuery(jsEvent.currentTarget).addClass("fc-state-highlight");
}; // get input value
const inputHandler = event => {
if (event.target.name === 'select' || event.target.name === 'radio') {
setSelectItem(event.target.value);
}
}; // category list generate
const categoryList = () => {
return [...new Set(cat_json_data.map(val => val.category))];
}; // event filter in calendar
let calendarEventFilters = items.filter(event => {
if (event.category.includes(selectItem)) {
return event;
} else if (selectItem == '') {
return event;
}
}); // showing filter in date wise
let eventFilter = items.filter(event => {
if (getClickDate === moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(event.date).format('YYYY-MM-DD') && event.category.includes(selectItem)) {
return event;
} else if (getClickDate === moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(event.date).format('YYYY-MM-DD') && selectItem == "") {
return event;
}
});
return isLoaded ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_5__.EventContex.Provider, {
value: {
items,
calendarEvents: calendarEventFilters,
dayClickHandle: dayClickHandle,
getMonth: getMonthYear,
category: categoryList(),
shortcodeData: shortcodeData,
inputHandler: inputHandler,
eventFilter: eventFilter,
localeName: localeName,
start_of_week: start_of_week
}
}, shortcodeData.style === 'style-1' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "event-calendar-wrapper"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-row calendar_show " + shortcodeData.calendar_show
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: shortcodeData.calendar_show == 'full_width' ? "etn-col-lg-12" : "etn-col-lg-7"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-fullcalendar-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "cat-dropdown-list"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_CategoryDropdownFilter__WEBPACK_IMPORTED_MODULE_4__["default"], null)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_EtnCalendar__WEBPACK_IMPORTED_MODULE_2__["default"], null))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: shortcodeData.calendar_show == 'full_width' ? "etn-col-lg-12" : "etn-col-lg-5"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "date-selected-calendar-event"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-cal-selected-date"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, shortcodeData.selected_date_text), moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(getClickDate).format('MMMM DD, YYYY')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_EventStyle_EventStyle1__WEBPACK_IMPORTED_MODULE_6__["default"], null)))), loader === false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_8__
}))), shortcodeData.style === 'style-2' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "event-calendar-wrapper calendar-event-filter2"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-row calendar_show"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-lg-3"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "cat-radio-list"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_CategoryRadioFilterList__WEBPACK_IMPORTED_MODULE_7__["default"], null))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-lg-5"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-fullcalendar-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_EtnCalendar__WEBPACK_IMPORTED_MODULE_2__["default"], null))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-lg-4"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "date-selected-calendar-event"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-cal-selected-date"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, shortcodeData.selected_date_text), moment_moment_js__WEBPACK_IMPORTED_MODULE_3___default()(getClickDate).format('MMMM DD, YYYY')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_EventStyle_EventStyle1__WEBPACK_IMPORTED_MODULE_6__["default"], null)))), loader === false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_8__
})))) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_8__
}));
}
/***/ }),
/***/ "./src/Widgets/EventCalendarStandard.js":
/*!**********************************************!*\
!*** ./src/Widgets/EventCalendarStandard.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ EventCalendarStandard; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var moment_moment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment/moment.js */ "./node_modules/moment/moment.js");
/* harmony import */ var moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment_moment_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
/* harmony import */ var _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../assets/images/loader.gif */ "./assets/images/loader.gif");
/* harmony import */ var _fullcalendar_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @fullcalendar/react */ "./node_modules/@fullcalendar/react/dist/main.js");
/* harmony import */ var _fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @fullcalendar/daygrid */ "./node_modules/@fullcalendar/daygrid/main.js");
/* harmony import */ var _fullcalendar_timegrid__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @fullcalendar/timegrid */ "./node_modules/@fullcalendar/timegrid/main.js");
/* harmony import */ var _fullcalendar_interaction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @fullcalendar/interaction */ "./node_modules/@fullcalendar/interaction/main.js");
/* harmony import */ var _Components_CategoryDropdownFilter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Components/CategoryDropdownFilter */ "./src/Components/CategoryDropdownFilter.js");
function EventCalendarStandard(_ref) {
let {
dataCat,
dataControls
} = _ref;
var today = moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(new Date()).format('YYYY-MM-DD');
var currentMonth = moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(new Date()).format('MM');
var currentYear = moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(new Date()).format('YYYY');
const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
const [isLoaded, setIsLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
const [items, setItems] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
const [getClickDate, setClickDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(today);
const [selectItem, setSelectItem] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');
const [month, setMonth] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentMonth);
const [getYear, setYear] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentYear);
const [shortcodeData, setShortcodeData] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
const json_data = JSON.parse(dataControls);
const cat_json_data = JSON.parse(dataCat);
const site_url = localized_data_obj.site_url;
const localeName = localized_data_obj.locale_name;
const start_of_week = localized_data_obj.start_of_week;
const allDayS = json_data.all_day_slot === 'true' ? true : false;
const [loader, setLoader] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
setLoader(false);
fetch(`${site_url}/wp-json/eventin/v1/event/events?month=${month}&year=${getYear}&display=default&endDate=true&startTime=true`).then(res => res.json()).then(result => {
setLoader(true);
setIsLoaded(true);
setItems(result.content);
setShortcodeData(json_data);
}, error => {
setIsLoaded(false);
setLoader(false);
setError(error);
});
}, [month, getYear]); // event filter in calendar
let calendarEventFilters = items.filter(event => {
if (event.category.includes(selectItem)) {
return event;
} else if (selectItem == '') {
return event;
}
}); // get selected month
const getMonthYear = arg => {
setMonth(moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(arg.view.currentStart).format('MM'));
setYear(moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(arg.view.currentStart).format('YYYY'));
jQuery('.fc-day-today .fc-daygrid-day-number').addClass("fc-state-highlight");
}; // category list generate
const categoryList = () => {
return [...new Set(cat_json_data.map(val => val.category))];
}; // get input value
const inputHandler = event => {
if (event.target.name === 'select' || event.target.name === 'radio') {
setSelectItem(event.target.value);
}
}; // showing filter in date wise
let eventFilter = items.filter(event => {
if (getClickDate === moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(event.date).format('YYYY-MM-DD') && event.category.includes(selectItem)) {
return event;
} else if (getClickDate === moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(event.date).format('YYYY-MM-DD') && selectItem == "") {
return event;
}
}); // tooltip markup
const renderEventContent = event => {
var _event$event, _event$event$extended, _event$event2, _event$event2$extende, _event$event3, _event$event3$extende, _event$event4, _event$event5, _event$event5$extende, _event$event6, _event$event6$extende, _event$event7;
const columnClass = (_event$event = event.event) !== null && _event$event !== void 0 && (_event$event$extended = _event$event.extendedProps) !== null && _event$event$extended !== void 0 && _event$event$extended.thumbnail ? 'etn-col-lg-8' : 'etn-col-lg-12';
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
class: "fc-event-main-frame"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
class: "fc-event-title-container"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
class: "fc-event-title fc-sticky"
}, event.event.title, " "))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "calendar-tooltip"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-row calendar-tooltip-inner"
}, ((_event$event2 = event.event) === null || _event$event2 === void 0 ? void 0 : (_event$event2$extende = _event$event2.extendedProps) === null || _event$event2$extende === void 0 ? void 0 : _event$event2$extende.thumbnail) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-lg-4 etn-pr-0"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
className: "etn-event-thumbnail",
src: (_event$event3 = event.event) === null || _event$event3 === void 0 ? void 0 : (_event$event3$extende = _event$event3.extendedProps) === null || _event$event3$extende === void 0 ? void 0 : _event$event3$extende.thumbnail,
alt: (_event$event4 = event.event) === null || _event$event4 === void 0 ? void 0 : _event$event4.title
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: columnClass
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "calendar-tooltip-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
className: "etn-title"
}, " ", event.event.title), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-location"
}, " ", (_event$event5 = event.event) === null || _event$event5 === void 0 ? void 0 : (_event$event5$extende = _event$event5.extendedProps) === null || _event$event5$extende === void 0 ? void 0 : _event$event5$extende.location, " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-row"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-lg-6 etn-align-self-center"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-price",
dangerouslySetInnerHTML: {
__html: (_event$event6 = event.event) === null || _event$event6 === void 0 ? void 0 : (_event$event6$extende = _event$event6.extendedProps) === null || _event$event6$extende === void 0 ? void 0 : _event$event6$extende.price
}
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-lg-6"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
className: "etn-btn",
href: (_event$event7 = event.event) === null || _event$event7 === void 0 ? void 0 : _event$event7.url
}, " See Details ")))));
};
return isLoaded ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_3__.EventContex.Provider, {
value: {
items,
calendarEvents: calendarEventFilters,
getMonth: getMonthYear,
category: categoryList(),
inputHandler: inputHandler,
eventFilter: eventFilter,
shortcodeData: shortcodeData,
localeName: localeName,
start_of_week: start_of_week
}
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-pro-calendar-standard"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "cat-dropdown-list"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_CategoryDropdownFilter__WEBPACK_IMPORTED_MODULE_9__["default"], null)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-pro-calendar-standard-style"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_fullcalendar_react__WEBPACK_IMPORTED_MODULE_5__["default"], {
plugins: [_fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_6__["default"], _fullcalendar_timegrid__WEBPACK_IMPORTED_MODULE_7__["default"], _fullcalendar_interaction__WEBPACK_IMPORTED_MODULE_8__["default"]],
headerToolbar: {
left: 'prev',
center: 'title',
right: 'next'
},
initialView: json_data === null || json_data === void 0 ? void 0 : json_data.calendar_view,
events: calendarEventFilters,
eventContent: renderEventContent,
height: "auto",
datesSet: getMonthYear,
allDaySlot: allDayS,
locale: localeName,
firstDay: start_of_week
})), loader === false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_4__
})))) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_4__
}));
}
/***/ }),
/***/ "./src/Widgets/EventCalendarStandardList.js":
/*!**************************************************!*\
!*** ./src/Widgets/EventCalendarStandardList.js ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ EventCalendarStandardList; }
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var moment_moment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment/moment.js */ "./node_modules/moment/moment.js");
/* harmony import */ var moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment_moment_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _context_DataProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../context/DataProvider */ "./src/context/DataProvider.js");
/* harmony import */ var _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../assets/images/loader.gif */ "./assets/images/loader.gif");
/* harmony import */ var _fullcalendar_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @fullcalendar/react */ "./node_modules/@fullcalendar/react/dist/main.js");
/* harmony import */ var _fullcalendar_daygrid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @fullcalendar/daygrid */ "./node_modules/@fullcalendar/daygrid/main.js");
/* harmony import */ var _fullcalendar_timegrid__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @fullcalendar/timegrid */ "./node_modules/@fullcalendar/timegrid/main.js");
/* harmony import */ var _fullcalendar_interaction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @fullcalendar/interaction */ "./node_modules/@fullcalendar/interaction/main.js");
/* harmony import */ var _fullcalendar_list__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @fullcalendar/list */ "./node_modules/@fullcalendar/list/main.js");
/* harmony import */ var _Components_CategoryDropdownFilter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Components/CategoryDropdownFilter */ "./src/Components/CategoryDropdownFilter.js");
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers */ "./src/helpers/index.js");
function EventCalendarStandardList(_ref) {
let {
dataCat,
dataControls
} = _ref;
var today = moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(new Date()).format('YYYY-MM-DD');
var currentMonth = moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(new Date()).format('MM');
var currentYear = moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(new Date()).format('YYYY');
const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
const [isLoaded, setIsLoaded] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
const [items, setItems] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
const [getClickDate, setClickDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(today);
const [selectItem, setSelectItem] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');
const [month, setMonth] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentMonth);
const [getYear, setYear] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentYear);
const [shortcodeData, setShortcodeData] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
const json_data = JSON.parse(dataControls);
const cat_json_data = JSON.parse(dataCat);
const site_url = localized_data_obj.site_url;
const localeName = localized_data_obj.locale_name;
const start_of_week = localized_data_obj.start_of_week;
const allDayS = json_data.all_day_slot === 'true' ? true : false;
const [loader, setLoader] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
setLoader(false);
fetch(`${site_url}/wp-json/eventin/v1/event/events?month=${month}&year=${getYear}&display=default&endDate=true&startTime=true`).then(res => res.json()).then(result => {
setLoader(true);
setIsLoaded(true);
setItems(result.content);
setShortcodeData(json_data);
}, error => {
setIsLoaded(false);
setLoader(false);
setError(error);
});
}, [month, getYear]); // event filter in calendar
let calendarEventFilters = items.filter(event => {
if (event.category.includes(selectItem)) {
return event;
} else if (selectItem == '') {
return event;
}
}); // get selected month
const getMonthYear = arg => {
setMonth(moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(arg.view.currentStart).format('MM'));
setYear(moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(arg.view.currentStart).format('YYYY'));
jQuery('.fc-day-today .fc-daygrid-day-number').addClass("fc-state-highlight");
}; // category list generate
const categoryList = () => {
return [...new Set(cat_json_data.map(val => val.category))];
}; // get input value
const inputHandler = event => {
if (event.target.name === 'select' || event.target.name === 'radio') {
setSelectItem(event.target.value);
}
}; // showing filter in date wise
let eventFilter = items.filter(event => {
if (getClickDate === moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(event.date).format('YYYY-MM-DD') && event.category.includes(selectItem)) {
return event;
} else if (getClickDate === moment_moment_js__WEBPACK_IMPORTED_MODULE_2___default()(event.date).format('YYYY-MM-DD') && selectItem == "") {
return event;
}
});
let allDayContent = e => {
const url = e.view.getCurrentData().calendarOptions.events[1].thumbnail;
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: url,
height: "100px"
});
}; // tooltip markup
const renderEventContent = event => {
var _event$event, _event$event$extended, _event$event2, _event$event2$extende, _event$event3, _event$event3$extende, _event$event4, _event$event4$extende, _event$event5, _event$event5$extende, _event$event6, _event$event7, _event$event7$extende, _event$event8, _event$event8$extende, _event$event9, _event$event9$extende, _event$event10, _event$event10$extend, _event$event11, _event$event11$extend, _event$event12, _event$event12$extend, _event$event13, _event$event13$extend, _event$event14, _event$event14$extend, _event$event15;
const columnClass = (_event$event = event.event) !== null && _event$event !== void 0 && (_event$event$extended = _event$event.extendedProps) !== null && _event$event$extended !== void 0 && _event$event$extended.thumbnail ? 'etn-col-lg-8' : 'etn-col-lg-12';
const colClassMid = (_event$event2 = event.event) !== null && _event$event2 !== void 0 && (_event$event2$extende = _event$event2.extendedProps) !== null && _event$event2$extende !== void 0 && _event$event2$extende.thumbnail ? 'etn-col-md-6 etn-col-lg-7' : 'etn-col-md-10';
const colClassSm = (_event$event3 = event.event) !== null && _event$event3 !== void 0 && (_event$event3$extende = _event$event3.extendedProps) !== null && _event$event3$extende !== void 0 && _event$event3$extende.thumbnail ? 'etn-col-md-3 etn-col-lg-2' : 'etn-col-md-2 etn-col-lg-2';
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-container"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-row calendar-event-details"
}, ((_event$event4 = event.event) === null || _event$event4 === void 0 ? void 0 : (_event$event4$extende = _event$event4.extendedProps) === null || _event$event4$extende === void 0 ? void 0 : _event$event4$extende.thumbnail) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-col-md-3 calendar-event-details-thumbnail"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
className: "calendar-event-thumb-img",
src: (_event$event5 = event.event) === null || _event$event5 === void 0 ? void 0 : (_event$event5$extende = _event$event5.extendedProps) === null || _event$event5$extende === void 0 ? void 0 : _event$event5$extende.thumbnail,
alt: (_event$event6 = event.event) === null || _event$event6 === void 0 ? void 0 : _event$event6.title
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: colClassMid
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "calendar-event-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
className: "calendar-event-category-wrap"
}, (_event$event7 = event.event) === null || _event$event7 === void 0 ? void 0 : (_event$event7$extende = _event$event7.extendedProps) === null || _event$event7$extende === void 0 ? void 0 : _event$event7$extende.category.map((cat, i) => {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
className: "etn-event-category",
key: `etn-${cat}-${i}`
}, cat);
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
className: "calendar-event-title"
}, " ", event.event.title), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
className: "calendar-event-time-vanue"
}, (((_event$event8 = event.event) === null || _event$event8 === void 0 ? void 0 : (_event$event8$extende = _event$event8.extendedProps) === null || _event$event8$extende === void 0 ? void 0 : _event$event8$extende.start_time) || ((_event$event9 = event.event) === null || _event$event9 === void 0 ? void 0 : (_event$event9$extende = _event$event9.extendedProps) === null || _event$event9$extende === void 0 ? void 0 : _event$event9$extende.end_time)) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
className: "etn-event-calender-vanue etn-event-calender-time"
}, " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
className: "etn-event-calender-time-icon",
id: "Layer_1",
"data-name": "Layer 1",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 17.5 17.5"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M1.5,8.75A7.25,7.25,0,1,1,8.75,16,7.26,7.26,0,0,1,1.5,8.75ZM8.75,0A8.75,8.75,0,1,0,17.5,8.75,8.75,8.75,0,0,0,8.75,0ZM9.2,5.16a.75.75,0,0,0-1.5,0V8.44A2.37,2.37,0,0,0,8,9.59a2.43,2.43,0,0,0,.82.87h0l2.47,1.48a.76.76,0,0,0,1-.26.75.75,0,0,0-.26-1L9.62,9.17h0a.92.92,0,0,1-.28-.32.89.89,0,0,1-.14-.41Z",
fill: "#11142e",
"fill-rule": "evenodd"
})), " ", (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.combineStartAndEndTime)((_event$event10 = event.event) === null || _event$event10 === void 0 ? void 0 : (_event$event10$extend = _event$event10.extendedProps) === null || _event$event10$extend === void 0 ? void 0 : _event$event10$extend.start_time, (_event$event11 = event.event) === null || _event$event11 === void 0 ? void 0 : (_event$event11$extend = _event$event11.extendedProps) === null || _event$event11$extend === void 0 ? void 0 : _event$event11$extend.end_time), " "), ((_event$event12 = event.event) === null || _event$event12 === void 0 ? void 0 : (_event$event12$extend = _event$event12.extendedProps) === null || _event$event12$extend === void 0 ? void 0 : _event$event12$extend.location) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
className: "etn-event-calender-vanue etn-location"
}, " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
className: "etn-location-icon",
id: "Layer_1",
"data-name": "Layer 1",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 15.3 17.5"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M1.93,6.36a5.89,5.89,0,0,1,6-4.61,5.9,5.9,0,0,1,6,4.62h0c.83,3.65-1.43,6.83-3.61,8.92h0a3.41,3.41,0,0,1-4.73,0C3.36,13.2,1.1,10,1.93,6.36ZM7.9.25A7.41,7.41,0,0,1,15.34,6c1,4.47-1.78,8.17-4,10.34a4.91,4.91,0,0,1-6.81,0h0C2.24,14.21-.55,10.5.46,6h0A7.41,7.41,0,0,1,7.9.25ZM6.15,7.65A1.75,1.75,0,1,1,7.9,9.4,1.75,1.75,0,0,1,6.15,7.65ZM7.9,4.4a3.25,3.25,0,1,0,3.25,3.25A3.26,3.26,0,0,0,7.9,4.4Z",
transform: "translate(-0.25 -0.25)",
fill: "#11142e",
"fill-rule": "evenodd"
})), " ", (_event$event13 = event.event) === null || _event$event13 === void 0 ? void 0 : (_event$event13$extend = _event$event13.extendedProps) === null || _event$event13$extend === void 0 ? void 0 : _event$event13$extend.location, " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: colClassSm + ' event-calendar-action'
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-price event-calendar-action-price",
dangerouslySetInnerHTML: {
__html: (_event$event14 = event.event) === null || _event$event14 === void 0 ? void 0 : (_event$event14$extend = _event$event14.extendedProps) === null || _event$event14$extend === void 0 ? void 0 : _event$event14$extend.price
}
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
className: "etn-btn event-calendar-details-btn",
href: (_event$event15 = event.event) === null || _event$event15 === void 0 ? void 0 : _event$event15.url
}, " View Details ")))));
};
return isLoaded ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_context_DataProvider__WEBPACK_IMPORTED_MODULE_3__.EventContex.Provider, {
value: {
items,
calendarEvents: calendarEventFilters,
getMonth: getMonthYear,
category: categoryList(),
inputHandler: inputHandler,
eventFilter: eventFilter,
shortcodeData: shortcodeData,
localeName: localeName,
start_of_week: start_of_week
}
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-pro-calendar-standard"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "cat-dropdown-list"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Components_CategoryDropdownFilter__WEBPACK_IMPORTED_MODULE_10__["default"], null)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-pro-calendar-standard-style"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_fullcalendar_react__WEBPACK_IMPORTED_MODULE_5__["default"], {
headerToolbar: {
left: 'prev',
center: 'title',
right: 'next'
},
plugins: [_fullcalendar_list__WEBPACK_IMPORTED_MODULE_9__["default"]],
initialView: json_data === null || json_data === void 0 ? void 0 : json_data.calendar_view,
events: calendarEventFilters,
eventContent: renderEventContent,
height: "auto",
datesSet: getMonthYear,
locale: localeName,
firstDay: start_of_week
})), loader === false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_4__
})))) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "etn-event-loader"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: _assets_images_loader_gif__WEBPACK_IMPORTED_MODULE_4__
}));
}
/***/ }),
/***/ "./src/context/DataProvider.js":
/*!*************************************!*\
!*** ./src/context/DataProvider.js ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "EventContex": function() { return /* binding */ EventContex; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
const EventContex = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)();
/***/ }),
/***/ "./src/helpers/index.js":
/*!******************************!*\
!*** ./src/helpers/index.js ***!
\******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "truncate": function() { return /* binding */ truncate; },
/* harmony export */ "combineStartAndEndTime": function() { return /* binding */ combineStartAndEndTime; }
/* harmony export */ });
const truncate = str => {
return str.length > 5 ? str.substring(0, 100) + "..." : str;
};
const combineStartAndEndTime = (start, end) => {
return `${start} - ${end}`;
};
/***/ }),
/***/ "./node_modules/@fullcalendar/common/main.css":
/*!****************************************************!*\
!*** ./node_modules/@fullcalendar/common/main.css ***!
\****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./node_modules/@fullcalendar/daygrid/main.css":
/*!*****************************************************!*\
!*** ./node_modules/@fullcalendar/daygrid/main.css ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./node_modules/@fullcalendar/list/main.css":
/*!**************************************************!*\
!*** ./node_modules/@fullcalendar/list/main.css ***!
\**************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./node_modules/@fullcalendar/timegrid/main.css":
/*!******************************************************!*\
!*** ./node_modules/@fullcalendar/timegrid/main.css ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./node_modules/moment/locale/af.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/af.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Afrikaans [af]
//! author : Werner Mollentze : https://github.com/wernerm
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var af = moment.defineLocale('af', {
months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
'_'
),
monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
'_'
),
weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
meridiemParse: /vm|nm/i,
isPM: function (input) {
return /^nm$/i.test(input);
},
meridiem: function (hours, minutes, isLower) {
if (hours < 12) {
return isLower ? 'vm' : 'VM';
} else {
return isLower ? 'nm' : 'NM';
}
},
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Vandag om] LT',
nextDay: '[Môre om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[Gister om] LT',
lastWeek: '[Laas] dddd [om] LT',
sameElse: 'L',
},
relativeTime: {
future: 'oor %s',
past: '%s gelede',
s: "'n paar sekondes",
ss: '%d sekondes',
m: "'n minuut",
mm: '%d minute',
h: "'n uur",
hh: '%d ure',
d: "'n dag",
dd: '%d dae',
M: "'n maand",
MM: '%d maande',
y: "'n jaar",
yy: '%d jaar',
},
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
ordinal: function (number) {
return (
number +
(number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
); // Thanks to Joris Röling : https://github.com/jjupiter
},
week: {
dow: 1, // Maandag is die eerste dag van die week.
doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
},
});
return af;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar-dz.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ar-dz.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic (Algeria) [ar-dz]
//! author : Amine Roukh: https://github.com/Amine27
//! author : Abdel Said: https://github.com/abdelsaid
//! author : Ahmed Elkhatib
//! author : forabi https://github.com/forabi
//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var pluralForm = function (n) {
return n === 0
? 0
: n === 1
? 1
: n === 2
? 2
: n % 100 >= 3 && n % 100 <= 10
? 3
: n % 100 >= 11
? 4
: 5;
},
plurals = {
s: [
'أقل من ثانية',
'ثانية واحدة',
['ثانيتان', 'ثانيتين'],
'%d ثوان',
'%d ثانية',
'%d ثانية',
],
m: [
'أقل من دقيقة',
'دقيقة واحدة',
['دقيقتان', 'دقيقتين'],
'%d دقائق',
'%d دقيقة',
'%d دقيقة',
],
h: [
'أقل من ساعة',
'ساعة واحدة',
['ساعتان', 'ساعتين'],
'%d ساعات',
'%d ساعة',
'%d ساعة',
],
d: [
'أقل من يوم',
'يوم واحد',
['يومان', 'يومين'],
'%d أيام',
'%d يومًا',
'%d يوم',
],
M: [
'أقل من شهر',
'شهر واحد',
['شهران', 'شهرين'],
'%d أشهر',
'%d شهرا',
'%d شهر',
],
y: [
'أقل من عام',
'عام واحد',
['عامان', 'عامين'],
'%d أعوام',
'%d عامًا',
'%d عام',
],
},
pluralize = function (u) {
return function (number, withoutSuffix, string, isFuture) {
var f = pluralForm(number),
str = plurals[u][pluralForm(number)];
if (f === 2) {
str = str[withoutSuffix ? 0 : 1];
}
return str.replace(/%d/i, number);
};
},
months = [
'جانفي',
'فيفري',
'مارس',
'أفريل',
'ماي',
'جوان',
'جويلية',
'أوت',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
var arDz = moment.defineLocale('ar-dz', {
months: months,
monthsShort: months,
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'D/\u200FM/\u200FYYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
meridiemParse: /ص|م/,
isPM: function (input) {
return 'م' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ص';
} else {
return 'م';
}
},
calendar: {
sameDay: '[اليوم عند الساعة] LT',
nextDay: '[غدًا عند الساعة] LT',
nextWeek: 'dddd [عند الساعة] LT',
lastDay: '[أمس عند الساعة] LT',
lastWeek: 'dddd [عند الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'بعد %s',
past: 'منذ %s',
s: pluralize('s'),
ss: pluralize('s'),
m: pluralize('m'),
mm: pluralize('m'),
h: pluralize('h'),
hh: pluralize('h'),
d: pluralize('d'),
dd: pluralize('d'),
M: pluralize('M'),
MM: pluralize('M'),
y: pluralize('y'),
yy: pluralize('y'),
},
postformat: function (string) {
return string.replace(/,/g, '،');
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return arDz;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar-kw.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ar-kw.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic (Kuwait) [ar-kw]
//! author : Nusret Parlak: https://github.com/nusretparlak
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var arKw = moment.defineLocale('ar-kw', {
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
'_'
),
monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
'_'
),
weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'في %s',
past: 'منذ %s',
s: 'ثوان',
ss: '%d ثانية',
m: 'دقيقة',
mm: '%d دقائق',
h: 'ساعة',
hh: '%d ساعات',
d: 'يوم',
dd: '%d أيام',
M: 'شهر',
MM: '%d أشهر',
y: 'سنة',
yy: '%d سنوات',
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return arKw;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar-ly.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ar-ly.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic (Lybia) [ar-ly]
//! author : Ali Hmer: https://github.com/kikoanis
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
0: '0',
},
pluralForm = function (n) {
return n === 0
? 0
: n === 1
? 1
: n === 2
? 2
: n % 100 >= 3 && n % 100 <= 10
? 3
: n % 100 >= 11
? 4
: 5;
},
plurals = {
s: [
'أقل من ثانية',
'ثانية واحدة',
['ثانيتان', 'ثانيتين'],
'%d ثوان',
'%d ثانية',
'%d ثانية',
],
m: [
'أقل من دقيقة',
'دقيقة واحدة',
['دقيقتان', 'دقيقتين'],
'%d دقائق',
'%d دقيقة',
'%d دقيقة',
],
h: [
'أقل من ساعة',
'ساعة واحدة',
['ساعتان', 'ساعتين'],
'%d ساعات',
'%d ساعة',
'%d ساعة',
],
d: [
'أقل من يوم',
'يوم واحد',
['يومان', 'يومين'],
'%d أيام',
'%d يومًا',
'%d يوم',
],
M: [
'أقل من شهر',
'شهر واحد',
['شهران', 'شهرين'],
'%d أشهر',
'%d شهرا',
'%d شهر',
],
y: [
'أقل من عام',
'عام واحد',
['عامان', 'عامين'],
'%d أعوام',
'%d عامًا',
'%d عام',
],
},
pluralize = function (u) {
return function (number, withoutSuffix, string, isFuture) {
var f = pluralForm(number),
str = plurals[u][pluralForm(number)];
if (f === 2) {
str = str[withoutSuffix ? 0 : 1];
}
return str.replace(/%d/i, number);
};
},
months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
var arLy = moment.defineLocale('ar-ly', {
months: months,
monthsShort: months,
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'D/\u200FM/\u200FYYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
meridiemParse: /ص|م/,
isPM: function (input) {
return 'م' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ص';
} else {
return 'م';
}
},
calendar: {
sameDay: '[اليوم عند الساعة] LT',
nextDay: '[غدًا عند الساعة] LT',
nextWeek: 'dddd [عند الساعة] LT',
lastDay: '[أمس عند الساعة] LT',
lastWeek: 'dddd [عند الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'بعد %s',
past: 'منذ %s',
s: pluralize('s'),
ss: pluralize('s'),
m: pluralize('m'),
mm: pluralize('m'),
h: pluralize('h'),
hh: pluralize('h'),
d: pluralize('d'),
dd: pluralize('d'),
M: pluralize('M'),
MM: pluralize('M'),
y: pluralize('y'),
yy: pluralize('y'),
},
preparse: function (string) {
return string.replace(/،/g, ',');
},
postformat: function (string) {
return string
.replace(/\d/g, function (match) {
return symbolMap[match];
})
.replace(/,/g, '،');
},
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return arLy;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar-ma.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ar-ma.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic (Morocco) [ar-ma]
//! author : ElFadili Yassine : https://github.com/ElFadiliY
//! author : Abdel Said : https://github.com/abdelsaid
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var arMa = moment.defineLocale('ar-ma', {
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
'_'
),
monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
'_'
),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'في %s',
past: 'منذ %s',
s: 'ثوان',
ss: '%d ثانية',
m: 'دقيقة',
mm: '%d دقائق',
h: 'ساعة',
hh: '%d ساعات',
d: 'يوم',
dd: '%d أيام',
M: 'شهر',
MM: '%d أشهر',
y: 'سنة',
yy: '%d سنوات',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return arMa;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar-sa.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ar-sa.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic (Saudi Arabia) [ar-sa]
//! author : Suhail Alkowaileet : https://github.com/xsoh
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '١',
2: '٢',
3: '٣',
4: '٤',
5: '٥',
6: '٦',
7: '٧',
8: '٨',
9: '٩',
0: '٠',
},
numberMap = {
'١': '1',
'٢': '2',
'٣': '3',
'٤': '4',
'٥': '5',
'٦': '6',
'٧': '7',
'٨': '8',
'٩': '9',
'٠': '0',
};
var arSa = moment.defineLocale('ar-sa', {
months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
'_'
),
monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
'_'
),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
meridiemParse: /ص|م/,
isPM: function (input) {
return 'م' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ص';
} else {
return 'م';
}
},
calendar: {
sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'في %s',
past: 'منذ %s',
s: 'ثوان',
ss: '%d ثانية',
m: 'دقيقة',
mm: '%d دقائق',
h: 'ساعة',
hh: '%d ساعات',
d: 'يوم',
dd: '%d أيام',
M: 'شهر',
MM: '%d أشهر',
y: 'سنة',
yy: '%d سنوات',
},
preparse: function (string) {
return string
.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
})
.replace(/،/g, ',');
},
postformat: function (string) {
return string
.replace(/\d/g, function (match) {
return symbolMap[match];
})
.replace(/,/g, '،');
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return arSa;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar-tn.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ar-tn.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic (Tunisia) [ar-tn]
//! author : Nader Toukabri : https://github.com/naderio
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var arTn = moment.defineLocale('ar-tn', {
months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
'_'
),
monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
'_'
),
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'في %s',
past: 'منذ %s',
s: 'ثوان',
ss: '%d ثانية',
m: 'دقيقة',
mm: '%d دقائق',
h: 'ساعة',
hh: '%d ساعات',
d: 'يوم',
dd: '%d أيام',
M: 'شهر',
MM: '%d أشهر',
y: 'سنة',
yy: '%d سنوات',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return arTn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ar.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ar.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Arabic [ar]
//! author : Abdel Said: https://github.com/abdelsaid
//! author : Ahmed Elkhatib
//! author : forabi https://github.com/forabi
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '١',
2: '٢',
3: '٣',
4: '٤',
5: '٥',
6: '٦',
7: '٧',
8: '٨',
9: '٩',
0: '٠',
},
numberMap = {
'١': '1',
'٢': '2',
'٣': '3',
'٤': '4',
'٥': '5',
'٦': '6',
'٧': '7',
'٨': '8',
'٩': '9',
'٠': '0',
},
pluralForm = function (n) {
return n === 0
? 0
: n === 1
? 1
: n === 2
? 2
: n % 100 >= 3 && n % 100 <= 10
? 3
: n % 100 >= 11
? 4
: 5;
},
plurals = {
s: [
'أقل من ثانية',
'ثانية واحدة',
['ثانيتان', 'ثانيتين'],
'%d ثوان',
'%d ثانية',
'%d ثانية',
],
m: [
'أقل من دقيقة',
'دقيقة واحدة',
['دقيقتان', 'دقيقتين'],
'%d دقائق',
'%d دقيقة',
'%d دقيقة',
],
h: [
'أقل من ساعة',
'ساعة واحدة',
['ساعتان', 'ساعتين'],
'%d ساعات',
'%d ساعة',
'%d ساعة',
],
d: [
'أقل من يوم',
'يوم واحد',
['يومان', 'يومين'],
'%d أيام',
'%d يومًا',
'%d يوم',
],
M: [
'أقل من شهر',
'شهر واحد',
['شهران', 'شهرين'],
'%d أشهر',
'%d شهرا',
'%d شهر',
],
y: [
'أقل من عام',
'عام واحد',
['عامان', 'عامين'],
'%d أعوام',
'%d عامًا',
'%d عام',
],
},
pluralize = function (u) {
return function (number, withoutSuffix, string, isFuture) {
var f = pluralForm(number),
str = plurals[u][pluralForm(number)];
if (f === 2) {
str = str[withoutSuffix ? 0 : 1];
}
return str.replace(/%d/i, number);
};
},
months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
var ar = moment.defineLocale('ar', {
months: months,
monthsShort: months,
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'D/\u200FM/\u200FYYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
meridiemParse: /ص|م/,
isPM: function (input) {
return 'م' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ص';
} else {
return 'م';
}
},
calendar: {
sameDay: '[اليوم عند الساعة] LT',
nextDay: '[غدًا عند الساعة] LT',
nextWeek: 'dddd [عند الساعة] LT',
lastDay: '[أمس عند الساعة] LT',
lastWeek: 'dddd [عند الساعة] LT',
sameElse: 'L',
},
relativeTime: {
future: 'بعد %s',
past: 'منذ %s',
s: pluralize('s'),
ss: pluralize('s'),
m: pluralize('m'),
mm: pluralize('m'),
h: pluralize('h'),
hh: pluralize('h'),
d: pluralize('d'),
dd: pluralize('d'),
M: pluralize('M'),
MM: pluralize('M'),
y: pluralize('y'),
yy: pluralize('y'),
},
preparse: function (string) {
return string
.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
})
.replace(/،/g, ',');
},
postformat: function (string) {
return string
.replace(/\d/g, function (match) {
return symbolMap[match];
})
.replace(/,/g, '،');
},
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return ar;
})));
/***/ }),
/***/ "./node_modules/moment/locale/az.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/az.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Azerbaijani [az]
//! author : topchiyev : https://github.com/topchiyev
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var suffixes = {
1: '-inci',
5: '-inci',
8: '-inci',
70: '-inci',
80: '-inci',
2: '-nci',
7: '-nci',
20: '-nci',
50: '-nci',
3: '-üncü',
4: '-üncü',
100: '-üncü',
6: '-ncı',
9: '-uncu',
10: '-uncu',
30: '-uncu',
60: '-ıncı',
90: '-ıncı',
};
var az = moment.defineLocale('az', {
months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
'_'
),
monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
'_'
),
weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[bugün saat] LT',
nextDay: '[sabah saat] LT',
nextWeek: '[gələn həftə] dddd [saat] LT',
lastDay: '[dünən] LT',
lastWeek: '[keçən həftə] dddd [saat] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s sonra',
past: '%s əvvəl',
s: 'bir neçə saniyə',
ss: '%d saniyə',
m: 'bir dəqiqə',
mm: '%d dəqiqə',
h: 'bir saat',
hh: '%d saat',
d: 'bir gün',
dd: '%d gün',
M: 'bir ay',
MM: '%d ay',
y: 'bir il',
yy: '%d il',
},
meridiemParse: /gecə|səhər|gündüz|axşam/,
isPM: function (input) {
return /^(gündüz|axşam)$/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'gecə';
} else if (hour < 12) {
return 'səhər';
} else if (hour < 17) {
return 'gündüz';
} else {
return 'axşam';
}
},
dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
ordinal: function (number) {
if (number === 0) {
// special case for zero
return number + '-ıncı';
}
var a = number % 10,
b = (number % 100) - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return az;
})));
/***/ }),
/***/ "./node_modules/moment/locale/be.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/be.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Belarusian [be]
//! author : Dmitry Demidov : https://github.com/demidov91
//! author: Praleska: http://praleska.pro/
//! Author : Menelion Elensúle : https://github.com/Oire
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11
? forms[0]
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
? forms[1]
: forms[2];
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
dd: 'дзень_дні_дзён',
MM: 'месяц_месяцы_месяцаў',
yy: 'год_гады_гадоў',
};
if (key === 'm') {
return withoutSuffix ? 'хвіліна' : 'хвіліну';
} else if (key === 'h') {
return withoutSuffix ? 'гадзіна' : 'гадзіну';
} else {
return number + ' ' + plural(format[key], +number);
}
}
var be = moment.defineLocale('be', {
months: {
format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
'_'
),
standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
'_'
),
},
monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split(
'_'
),
weekdays: {
format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
'_'
),
standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
'_'
),
isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
},
weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY г.',
LLL: 'D MMMM YYYY г., HH:mm',
LLLL: 'dddd, D MMMM YYYY г., HH:mm',
},
calendar: {
sameDay: '[Сёння ў] LT',
nextDay: '[Заўтра ў] LT',
lastDay: '[Учора ў] LT',
nextWeek: function () {
return '[У] dddd [ў] LT';
},
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 5:
case 6:
return '[У мінулую] dddd [ў] LT';
case 1:
case 2:
case 4:
return '[У мінулы] dddd [ў] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'праз %s',
past: '%s таму',
s: 'некалькі секунд',
m: relativeTimeWithPlural,
mm: relativeTimeWithPlural,
h: relativeTimeWithPlural,
hh: relativeTimeWithPlural,
d: 'дзень',
dd: relativeTimeWithPlural,
M: 'месяц',
MM: relativeTimeWithPlural,
y: 'год',
yy: relativeTimeWithPlural,
},
meridiemParse: /ночы|раніцы|дня|вечара/,
isPM: function (input) {
return /^(дня|вечара)$/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'ночы';
} else if (hour < 12) {
return 'раніцы';
} else if (hour < 17) {
return 'дня';
} else {
return 'вечара';
}
},
dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
ordinal: function (number, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
case 'w':
case 'W':
return (number % 10 === 2 || number % 10 === 3) &&
number % 100 !== 12 &&
number % 100 !== 13
? number + '-і'
: number + '-ы';
case 'D':
return number + '-га';
default:
return number;
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return be;
})));
/***/ }),
/***/ "./node_modules/moment/locale/bg.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/bg.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Bulgarian [bg]
//! author : Krasen Borisov : https://github.com/kraz
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var bg = moment.defineLocale('bg', {
months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
'_'
),
monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
'_'
),
weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'D.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY H:mm',
LLLL: 'dddd, D MMMM YYYY H:mm',
},
calendar: {
sameDay: '[Днес в] LT',
nextDay: '[Утре в] LT',
nextWeek: 'dddd [в] LT',
lastDay: '[Вчера в] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[Миналата] dddd [в] LT';
case 1:
case 2:
case 4:
case 5:
return '[Миналия] dddd [в] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'след %s',
past: 'преди %s',
s: 'няколко секунди',
ss: '%d секунди',
m: 'минута',
mm: '%d минути',
h: 'час',
hh: '%d часа',
d: 'ден',
dd: '%d дена',
w: 'седмица',
ww: '%d седмици',
M: 'месец',
MM: '%d месеца',
y: 'година',
yy: '%d години',
},
dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal: function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return bg;
})));
/***/ }),
/***/ "./node_modules/moment/locale/bm.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/bm.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Bambara [bm]
//! author : Estelle Comment : https://github.com/estellecomment
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var bm = moment.defineLocale('bm', {
months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
'_'
),
monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'MMMM [tile] D [san] YYYY',
LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
},
calendar: {
sameDay: '[Bi lɛrɛ] LT',
nextDay: '[Sini lɛrɛ] LT',
nextWeek: 'dddd [don lɛrɛ] LT',
lastDay: '[Kunu lɛrɛ] LT',
lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s kɔnɔ',
past: 'a bɛ %s bɔ',
s: 'sanga dama dama',
ss: 'sekondi %d',
m: 'miniti kelen',
mm: 'miniti %d',
h: 'lɛrɛ kelen',
hh: 'lɛrɛ %d',
d: 'tile kelen',
dd: 'tile %d',
M: 'kalo kelen',
MM: 'kalo %d',
y: 'san kelen',
yy: 'san %d',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return bm;
})));
/***/ }),
/***/ "./node_modules/moment/locale/bn-bd.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/bn-bd.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Bengali (Bangladesh) [bn-bd]
//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '১',
2: '২',
3: '৩',
4: '৪',
5: '৫',
6: '৬',
7: '৭',
8: '৮',
9: '৯',
0: '০',
},
numberMap = {
'১': '1',
'২': '2',
'৩': '3',
'৪': '4',
'৫': '5',
'৬': '6',
'৭': '7',
'৮': '8',
'৯': '9',
'০': '0',
};
var bnBd = moment.defineLocale('bn-bd', {
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
'_'
),
monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
'_'
),
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
'_'
),
weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
longDateFormat: {
LT: 'A h:mm সময়',
LTS: 'A h:mm:ss সময়',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm সময়',
LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
},
calendar: {
sameDay: '[আজ] LT',
nextDay: '[আগামীকাল] LT',
nextWeek: 'dddd, LT',
lastDay: '[গতকাল] LT',
lastWeek: '[গত] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s পরে',
past: '%s আগে',
s: 'কয়েক সেকেন্ড',
ss: '%d সেকেন্ড',
m: 'এক মিনিট',
mm: '%d মিনিট',
h: 'এক ঘন্টা',
hh: '%d ঘন্টা',
d: 'এক দিন',
dd: '%d দিন',
M: 'এক মাস',
MM: '%d মাস',
y: 'এক বছর',
yy: '%d বছর',
},
preparse: function (string) {
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'রাত') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'ভোর') {
return hour;
} else if (meridiem === 'সকাল') {
return hour;
} else if (meridiem === 'দুপুর') {
return hour >= 3 ? hour : hour + 12;
} else if (meridiem === 'বিকাল') {
return hour + 12;
} else if (meridiem === 'সন্ধ্যা') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'রাত';
} else if (hour < 6) {
return 'ভোর';
} else if (hour < 12) {
return 'সকাল';
} else if (hour < 15) {
return 'দুপুর';
} else if (hour < 18) {
return 'বিকাল';
} else if (hour < 20) {
return 'সন্ধ্যা';
} else {
return 'রাত';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return bnBd;
})));
/***/ }),
/***/ "./node_modules/moment/locale/bn.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/bn.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Bengali [bn]
//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '১',
2: '২',
3: '৩',
4: '৪',
5: '৫',
6: '৬',
7: '৭',
8: '৮',
9: '৯',
0: '০',
},
numberMap = {
'১': '1',
'২': '2',
'৩': '3',
'৪': '4',
'৫': '5',
'৬': '6',
'৭': '7',
'৮': '8',
'৯': '9',
'০': '0',
};
var bn = moment.defineLocale('bn', {
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
'_'
),
monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
'_'
),
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
'_'
),
weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
longDateFormat: {
LT: 'A h:mm সময়',
LTS: 'A h:mm:ss সময়',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm সময়',
LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
},
calendar: {
sameDay: '[আজ] LT',
nextDay: '[আগামীকাল] LT',
nextWeek: 'dddd, LT',
lastDay: '[গতকাল] LT',
lastWeek: '[গত] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s পরে',
past: '%s আগে',
s: 'কয়েক সেকেন্ড',
ss: '%d সেকেন্ড',
m: 'এক মিনিট',
mm: '%d মিনিট',
h: 'এক ঘন্টা',
hh: '%d ঘন্টা',
d: 'এক দিন',
dd: '%d দিন',
M: 'এক মাস',
MM: '%d মাস',
y: 'এক বছর',
yy: '%d বছর',
},
preparse: function (string) {
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (
(meridiem === 'রাত' && hour >= 4) ||
(meridiem === 'দুপুর' && hour < 5) ||
meridiem === 'বিকাল'
) {
return hour + 12;
} else {
return hour;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'রাত';
} else if (hour < 10) {
return 'সকাল';
} else if (hour < 17) {
return 'দুপুর';
} else if (hour < 20) {
return 'বিকাল';
} else {
return 'রাত';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return bn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/bo.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/bo.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Tibetan [bo]
//! author : Thupten N. Chakrishar : https://github.com/vajradog
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '༡',
2: '༢',
3: '༣',
4: '༤',
5: '༥',
6: '༦',
7: '༧',
8: '༨',
9: '༩',
0: '༠',
},
numberMap = {
'༡': '1',
'༢': '2',
'༣': '3',
'༤': '4',
'༥': '5',
'༦': '6',
'༧': '7',
'༨': '8',
'༩': '9',
'༠': '0',
};
var bo = moment.defineLocale('bo', {
months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
'_'
),
monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
'_'
),
monthsShortRegex: /^(ཟླ་\d{1,2})/,
monthsParseExact: true,
weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
'_'
),
weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
'_'
),
weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
longDateFormat: {
LT: 'A h:mm',
LTS: 'A h:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm',
LLLL: 'dddd, D MMMM YYYY, A h:mm',
},
calendar: {
sameDay: '[དི་རིང] LT',
nextDay: '[སང་ཉིན] LT',
nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
lastDay: '[ཁ་སང] LT',
lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s ལ་',
past: '%s སྔན་ལ',
s: 'ལམ་སང',
ss: '%d སྐར་ཆ།',
m: 'སྐར་མ་གཅིག',
mm: '%d སྐར་མ',
h: 'ཆུ་ཚོད་གཅིག',
hh: '%d ཆུ་ཚོད',
d: 'ཉིན་གཅིག',
dd: '%d ཉིན་',
M: 'ཟླ་བ་གཅིག',
MM: '%d ཟླ་བ',
y: 'ལོ་གཅིག',
yy: '%d ལོ',
},
preparse: function (string) {
return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (
(meridiem === 'མཚན་མོ' && hour >= 4) ||
(meridiem === 'ཉིན་གུང' && hour < 5) ||
meridiem === 'དགོང་དག'
) {
return hour + 12;
} else {
return hour;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'མཚན་མོ';
} else if (hour < 10) {
return 'ཞོགས་ཀས';
} else if (hour < 17) {
return 'ཉིན་གུང';
} else if (hour < 20) {
return 'དགོང་དག';
} else {
return 'མཚན་མོ';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return bo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/br.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/br.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Breton [br]
//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function relativeTimeWithMutation(number, withoutSuffix, key) {
var format = {
mm: 'munutenn',
MM: 'miz',
dd: 'devezh',
};
return number + ' ' + mutation(format[key], number);
}
function specialMutationForYears(number) {
switch (lastNumber(number)) {
case 1:
case 3:
case 4:
case 5:
case 9:
return number + ' bloaz';
default:
return number + ' vloaz';
}
}
function lastNumber(number) {
if (number > 9) {
return lastNumber(number % 10);
}
return number;
}
function mutation(text, number) {
if (number === 2) {
return softMutation(text);
}
return text;
}
function softMutation(text) {
var mutationTable = {
m: 'v',
b: 'v',
d: 'z',
};
if (mutationTable[text.charAt(0)] === undefined) {
return text;
}
return mutationTable[text.charAt(0)] + text.substring(1);
}
var monthsParse = [
/^gen/i,
/^c[ʼ\']hwe/i,
/^meu/i,
/^ebr/i,
/^mae/i,
/^(mez|eve)/i,
/^gou/i,
/^eos/i,
/^gwe/i,
/^her/i,
/^du/i,
/^ker/i,
],
monthsRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
fullWeekdaysParse = [
/^sul/i,
/^lun/i,
/^meurzh/i,
/^merc[ʼ\']her/i,
/^yaou/i,
/^gwener/i,
/^sadorn/i,
],
shortWeekdaysParse = [
/^Sul/i,
/^Lun/i,
/^Meu/i,
/^Mer/i,
/^Yao/i,
/^Gwe/i,
/^Sad/i,
],
minWeekdaysParse = [
/^Su/i,
/^Lu/i,
/^Me([^r]|$)/i,
/^Mer/i,
/^Ya/i,
/^Gw/i,
/^Sa/i,
];
var br = moment.defineLocale('br', {
months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
'_'
),
monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
weekdaysParse: minWeekdaysParse,
fullWeekdaysParse: fullWeekdaysParse,
shortWeekdaysParse: shortWeekdaysParse,
minWeekdaysParse: minWeekdaysParse,
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: monthsStrictRegex,
monthsShortStrictRegex: monthsShortStrictRegex,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [a viz] MMMM YYYY',
LLL: 'D [a viz] MMMM YYYY HH:mm',
LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Hiziv da] LT',
nextDay: '[Warcʼhoazh da] LT',
nextWeek: 'dddd [da] LT',
lastDay: '[Decʼh da] LT',
lastWeek: 'dddd [paset da] LT',
sameElse: 'L',
},
relativeTime: {
future: 'a-benn %s',
past: '%s ʼzo',
s: 'un nebeud segondennoù',
ss: '%d eilenn',
m: 'ur vunutenn',
mm: relativeTimeWithMutation,
h: 'un eur',
hh: '%d eur',
d: 'un devezh',
dd: relativeTimeWithMutation,
M: 'ur miz',
MM: relativeTimeWithMutation,
y: 'ur bloaz',
yy: specialMutationForYears,
},
dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
ordinal: function (number) {
var output = number === 1 ? 'añ' : 'vet';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
isPM: function (token) {
return token === 'g.m.';
},
meridiem: function (hour, minute, isLower) {
return hour < 12 ? 'a.m.' : 'g.m.';
},
});
return br;
})));
/***/ }),
/***/ "./node_modules/moment/locale/bs.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/bs.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Bosnian [bs]
//! author : Nedim Cholich : https://github.com/frontyard
//! based on (hr) translation by Bojan Marković
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function translate(number, withoutSuffix, key) {
var result = number + ' ';
switch (key) {
case 'ss':
if (number === 1) {
result += 'sekunda';
} else if (number === 2 || number === 3 || number === 4) {
result += 'sekunde';
} else {
result += 'sekundi';
}
return result;
case 'm':
return withoutSuffix ? 'jedna minuta' : 'jedne minute';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2 || number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minuta';
}
return result;
case 'h':
return withoutSuffix ? 'jedan sat' : 'jednog sata';
case 'hh':
if (number === 1) {
result += 'sat';
} else if (number === 2 || number === 3 || number === 4) {
result += 'sata';
} else {
result += 'sati';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dana';
}
return result;
case 'MM':
if (number === 1) {
result += 'mjesec';
} else if (number === 2 || number === 3 || number === 4) {
result += 'mjeseca';
} else {
result += 'mjeseci';
}
return result;
case 'yy':
if (number === 1) {
result += 'godina';
} else if (number === 2 || number === 3 || number === 4) {
result += 'godine';
} else {
result += 'godina';
}
return result;
}
}
var bs = moment.defineLocale('bs', {
months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
'_'
),
monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
'_'
),
weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd, D. MMMM YYYY H:mm',
},
calendar: {
sameDay: '[danas u] LT',
nextDay: '[sutra u] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[u] [nedjelju] [u] LT';
case 3:
return '[u] [srijedu] [u] LT';
case 6:
return '[u] [subotu] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[u] dddd [u] LT';
}
},
lastDay: '[jučer u] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
return '[prošlu] dddd [u] LT';
case 6:
return '[prošle] [subote] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[prošli] dddd [u] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: 'prije %s',
s: 'par sekundi',
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: 'dan',
dd: translate,
M: 'mjesec',
MM: translate,
y: 'godinu',
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return bs;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ca.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ca.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Catalan [ca]
//! author : Juan G. Hurtado : https://github.com/juanghurtado
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ca = moment.defineLocale('ca', {
months: {
standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
'_'
),
format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
'_'
),
isFormat: /D[oD]?(\s)+MMMM/,
},
monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
'_'
),
weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM [de] YYYY',
ll: 'D MMM YYYY',
LLL: 'D MMMM [de] YYYY [a les] H:mm',
lll: 'D MMM YYYY, H:mm',
LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
llll: 'ddd D MMM YYYY, H:mm',
},
calendar: {
sameDay: function () {
return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
},
nextDay: function () {
return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
},
nextWeek: function () {
return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
},
lastDay: function () {
return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
},
lastWeek: function () {
return (
'[el] dddd [passat a ' +
(this.hours() !== 1 ? 'les' : 'la') +
'] LT'
);
},
sameElse: 'L',
},
relativeTime: {
future: "d'aquí %s",
past: 'fa %s',
s: 'uns segons',
ss: '%d segons',
m: 'un minut',
mm: '%d minuts',
h: 'una hora',
hh: '%d hores',
d: 'un dia',
dd: '%d dies',
M: 'un mes',
MM: '%d mesos',
y: 'un any',
yy: '%d anys',
},
dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
ordinal: function (number, period) {
var output =
number === 1
? 'r'
: number === 2
? 'n'
: number === 3
? 'r'
: number === 4
? 't'
: 'è';
if (period === 'w' || period === 'W') {
output = 'a';
}
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return ca;
})));
/***/ }),
/***/ "./node_modules/moment/locale/cs.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/cs.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Czech [cs]
//! author : petrbela : https://github.com/petrbela
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
'_'
),
monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
monthsParse = [
/^led/i,
/^úno/i,
/^bře/i,
/^dub/i,
/^kvě/i,
/^(čvn|červen$|června)/i,
/^(čvc|červenec|července)/i,
/^srp/i,
/^zář/i,
/^říj/i,
/^lis/i,
/^pro/i,
],
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
function plural(n) {
return n > 1 && n < 5 && ~~(n / 10) !== 1;
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'sekundy' : 'sekund');
} else {
return result + 'sekundami';
}
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minuty' : 'minut');
} else {
return result + 'minutami';
}
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodin');
} else {
return result + 'hodinami';
}
case 'd': // a day / in a day / a day ago
return withoutSuffix || isFuture ? 'den' : 'dnem';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dny' : 'dní');
} else {
return result + 'dny';
}
case 'M': // a month / in a month / a month ago
return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'měsíce' : 'měsíců');
} else {
return result + 'měsíci';
}
case 'y': // a year / in a year / a year ago
return withoutSuffix || isFuture ? 'rok' : 'rokem';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'let');
} else {
return result + 'lety';
}
}
}
var cs = moment.defineLocale('cs', {
months: months,
monthsShort: monthsShort,
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd D. MMMM YYYY H:mm',
l: 'D. M. YYYY',
},
calendar: {
sameDay: '[dnes v] LT',
nextDay: '[zítra v] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v neděli v] LT';
case 1:
case 2:
return '[v] dddd [v] LT';
case 3:
return '[ve středu v] LT';
case 4:
return '[ve čtvrtek v] LT';
case 5:
return '[v pátek v] LT';
case 6:
return '[v sobotu v] LT';
}
},
lastDay: '[včera v] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulou neděli v] LT';
case 1:
case 2:
return '[minulé] dddd [v] LT';
case 3:
return '[minulou středu v] LT';
case 4:
case 5:
return '[minulý] dddd [v] LT';
case 6:
return '[minulou sobotu v] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: 'před %s',
s: translate,
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return cs;
})));
/***/ }),
/***/ "./node_modules/moment/locale/cv.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/cv.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Chuvash [cv]
//! author : Anatoly Mironov : https://github.com/mirontoli
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var cv = moment.defineLocale('cv', {
months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
'_'
),
monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
'_'
),
weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD-MM-YYYY',
LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
},
calendar: {
sameDay: '[Паян] LT [сехетре]',
nextDay: '[Ыран] LT [сехетре]',
lastDay: '[Ӗнер] LT [сехетре]',
nextWeek: '[Ҫитес] dddd LT [сехетре]',
lastWeek: '[Иртнӗ] dddd LT [сехетре]',
sameElse: 'L',
},
relativeTime: {
future: function (output) {
var affix = /сехет$/i.exec(output)
? 'рен'
: /ҫул$/i.exec(output)
? 'тан'
: 'ран';
return output + affix;
},
past: '%s каялла',
s: 'пӗр-ик ҫеккунт',
ss: '%d ҫеккунт',
m: 'пӗр минут',
mm: '%d минут',
h: 'пӗр сехет',
hh: '%d сехет',
d: 'пӗр кун',
dd: '%d кун',
M: 'пӗр уйӑх',
MM: '%d уйӑх',
y: 'пӗр ҫул',
yy: '%d ҫул',
},
dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
ordinal: '%d-мӗш',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return cv;
})));
/***/ }),
/***/ "./node_modules/moment/locale/cy.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/cy.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Welsh [cy]
//! author : Robert Allen : https://github.com/robgallen
//! author : https://github.com/ryangreaves
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var cy = moment.defineLocale('cy', {
months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
'_'
),
monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
'_'
),
weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
'_'
),
weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
weekdaysParseExact: true,
// time formats are the same as en-gb
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Heddiw am] LT',
nextDay: '[Yfory am] LT',
nextWeek: 'dddd [am] LT',
lastDay: '[Ddoe am] LT',
lastWeek: 'dddd [diwethaf am] LT',
sameElse: 'L',
},
relativeTime: {
future: 'mewn %s',
past: '%s yn ôl',
s: 'ychydig eiliadau',
ss: '%d eiliad',
m: 'munud',
mm: '%d munud',
h: 'awr',
hh: '%d awr',
d: 'diwrnod',
dd: '%d diwrnod',
M: 'mis',
MM: '%d mis',
y: 'blwyddyn',
yy: '%d flynedd',
},
dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
// traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
ordinal: function (number) {
var b = number,
output = '',
lookup = [
'',
'af',
'il',
'ydd',
'ydd',
'ed',
'ed',
'ed',
'fed',
'fed',
'fed', // 1af to 10fed
'eg',
'fed',
'eg',
'eg',
'fed',
'eg',
'eg',
'fed',
'eg',
'fed', // 11eg to 20fed
];
if (b > 20) {
if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
output = 'fed'; // not 30ain, 70ain or 90ain
} else {
output = 'ain';
}
} else if (b > 0) {
output = lookup[b];
}
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return cy;
})));
/***/ }),
/***/ "./node_modules/moment/locale/da.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/da.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Danish [da]
//! author : Ulrik Nielsen : https://github.com/mrbase
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var da = moment.defineLocale('da', {
months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
'_'
),
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY HH:mm',
LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
},
calendar: {
sameDay: '[i dag kl.] LT',
nextDay: '[i morgen kl.] LT',
nextWeek: 'på dddd [kl.] LT',
lastDay: '[i går kl.] LT',
lastWeek: '[i] dddd[s kl.] LT',
sameElse: 'L',
},
relativeTime: {
future: 'om %s',
past: '%s siden',
s: 'få sekunder',
ss: '%d sekunder',
m: 'et minut',
mm: '%d minutter',
h: 'en time',
hh: '%d timer',
d: 'en dag',
dd: '%d dage',
M: 'en måned',
MM: '%d måneder',
y: 'et år',
yy: '%d år',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return da;
})));
/***/ }),
/***/ "./node_modules/moment/locale/de-at.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/de-at.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : German (Austria) [de-at]
//! author : lluchs : https://github.com/lluchs
//! author: Menelion Elensúle: https://github.com/Oire
//! author : Martin Groller : https://github.com/MadMG
//! author : Mikolaj Dadela : https://github.com/mik01aj
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
m: ['eine Minute', 'einer Minute'],
h: ['eine Stunde', 'einer Stunde'],
d: ['ein Tag', 'einem Tag'],
dd: [number + ' Tage', number + ' Tagen'],
w: ['eine Woche', 'einer Woche'],
M: ['ein Monat', 'einem Monat'],
MM: [number + ' Monate', number + ' Monaten'],
y: ['ein Jahr', 'einem Jahr'],
yy: [number + ' Jahre', number + ' Jahren'],
};
return withoutSuffix ? format[key][0] : format[key][1];
}
var deAt = moment.defineLocale('de-at', {
months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
'_'
),
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY HH:mm',
LLLL: 'dddd, D. MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[heute um] LT [Uhr]',
sameElse: 'L',
nextDay: '[morgen um] LT [Uhr]',
nextWeek: 'dddd [um] LT [Uhr]',
lastDay: '[gestern um] LT [Uhr]',
lastWeek: '[letzten] dddd [um] LT [Uhr]',
},
relativeTime: {
future: 'in %s',
past: 'vor %s',
s: 'ein paar Sekunden',
ss: '%d Sekunden',
m: processRelativeTime,
mm: '%d Minuten',
h: processRelativeTime,
hh: '%d Stunden',
d: processRelativeTime,
dd: processRelativeTime,
w: processRelativeTime,
ww: '%d Wochen',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return deAt;
})));
/***/ }),
/***/ "./node_modules/moment/locale/de-ch.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/de-ch.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : German (Switzerland) [de-ch]
//! author : sschueller : https://github.com/sschueller
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
m: ['eine Minute', 'einer Minute'],
h: ['eine Stunde', 'einer Stunde'],
d: ['ein Tag', 'einem Tag'],
dd: [number + ' Tage', number + ' Tagen'],
w: ['eine Woche', 'einer Woche'],
M: ['ein Monat', 'einem Monat'],
MM: [number + ' Monate', number + ' Monaten'],
y: ['ein Jahr', 'einem Jahr'],
yy: [number + ' Jahre', number + ' Jahren'],
};
return withoutSuffix ? format[key][0] : format[key][1];
}
var deCh = moment.defineLocale('de-ch', {
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
'_'
),
weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY HH:mm',
LLLL: 'dddd, D. MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[heute um] LT [Uhr]',
sameElse: 'L',
nextDay: '[morgen um] LT [Uhr]',
nextWeek: 'dddd [um] LT [Uhr]',
lastDay: '[gestern um] LT [Uhr]',
lastWeek: '[letzten] dddd [um] LT [Uhr]',
},
relativeTime: {
future: 'in %s',
past: 'vor %s',
s: 'ein paar Sekunden',
ss: '%d Sekunden',
m: processRelativeTime,
mm: '%d Minuten',
h: processRelativeTime,
hh: '%d Stunden',
d: processRelativeTime,
dd: processRelativeTime,
w: processRelativeTime,
ww: '%d Wochen',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return deCh;
})));
/***/ }),
/***/ "./node_modules/moment/locale/de.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/de.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : German [de]
//! author : lluchs : https://github.com/lluchs
//! author: Menelion Elensúle: https://github.com/Oire
//! author : Mikolaj Dadela : https://github.com/mik01aj
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
m: ['eine Minute', 'einer Minute'],
h: ['eine Stunde', 'einer Stunde'],
d: ['ein Tag', 'einem Tag'],
dd: [number + ' Tage', number + ' Tagen'],
w: ['eine Woche', 'einer Woche'],
M: ['ein Monat', 'einem Monat'],
MM: [number + ' Monate', number + ' Monaten'],
y: ['ein Jahr', 'einem Jahr'],
yy: [number + ' Jahre', number + ' Jahren'],
};
return withoutSuffix ? format[key][0] : format[key][1];
}
var de = moment.defineLocale('de', {
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
'_'
),
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY HH:mm',
LLLL: 'dddd, D. MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[heute um] LT [Uhr]',
sameElse: 'L',
nextDay: '[morgen um] LT [Uhr]',
nextWeek: 'dddd [um] LT [Uhr]',
lastDay: '[gestern um] LT [Uhr]',
lastWeek: '[letzten] dddd [um] LT [Uhr]',
},
relativeTime: {
future: 'in %s',
past: 'vor %s',
s: 'ein paar Sekunden',
ss: '%d Sekunden',
m: processRelativeTime,
mm: '%d Minuten',
h: processRelativeTime,
hh: '%d Stunden',
d: processRelativeTime,
dd: processRelativeTime,
w: processRelativeTime,
ww: '%d Wochen',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return de;
})));
/***/ }),
/***/ "./node_modules/moment/locale/dv.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/dv.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Maldivian [dv]
//! author : Jawish Hameed : https://github.com/jawish
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = [
'ޖެނުއަރީ',
'ފެބްރުއަރީ',
'މާރިޗު',
'އޭޕްރީލު',
'މޭ',
'ޖޫން',
'ޖުލައި',
'އޯގަސްޓު',
'ސެޕްޓެމްބަރު',
'އޮކްޓޯބަރު',
'ނޮވެމްބަރު',
'ޑިސެމްބަރު',
],
weekdays = [
'އާދިއްތަ',
'ހޯމަ',
'އަންގާރަ',
'ބުދަ',
'ބުރާސްފަތި',
'ހުކުރު',
'ހޮނިހިރު',
];
var dv = moment.defineLocale('dv', {
months: months,
monthsShort: months,
weekdays: weekdays,
weekdaysShort: weekdays,
weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'D/M/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
meridiemParse: /މކ|މފ/,
isPM: function (input) {
return 'މފ' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'މކ';
} else {
return 'މފ';
}
},
calendar: {
sameDay: '[މިއަދު] LT',
nextDay: '[މާދަމާ] LT',
nextWeek: 'dddd LT',
lastDay: '[އިއްޔެ] LT',
lastWeek: '[ފާއިތުވި] dddd LT',
sameElse: 'L',
},
relativeTime: {
future: 'ތެރޭގައި %s',
past: 'ކުރިން %s',
s: 'ސިކުންތުކޮޅެއް',
ss: 'd% ސިކުންތު',
m: 'މިނިޓެއް',
mm: 'މިނިޓު %d',
h: 'ގަޑިއިރެއް',
hh: 'ގަޑިއިރު %d',
d: 'ދުވަހެއް',
dd: 'ދުވަސް %d',
M: 'މަހެއް',
MM: 'މަސް %d',
y: 'އަހަރެއް',
yy: 'އަހަރު %d',
},
preparse: function (string) {
return string.replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/,/g, '،');
},
week: {
dow: 7, // Sunday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return dv;
})));
/***/ }),
/***/ "./node_modules/moment/locale/el.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/el.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Greek [el]
//! author : Aggelos Karalias : https://github.com/mehiel
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function isFunction(input) {
return (
(typeof Function !== 'undefined' && input instanceof Function) ||
Object.prototype.toString.call(input) === '[object Function]'
);
}
var el = moment.defineLocale('el', {
monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
'_'
),
monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
'_'
),
months: function (momentToFormat, format) {
if (!momentToFormat) {
return this._monthsNominativeEl;
} else if (
typeof format === 'string' &&
/D/.test(format.substring(0, format.indexOf('MMMM')))
) {
// if there is a day number before 'MMMM'
return this._monthsGenitiveEl[momentToFormat.month()];
} else {
return this._monthsNominativeEl[momentToFormat.month()];
}
},
monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
'_'
),
weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
meridiem: function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'μμ' : 'ΜΜ';
} else {
return isLower ? 'πμ' : 'ΠΜ';
}
},
isPM: function (input) {
return (input + '').toLowerCase()[0] === 'μ';
},
meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A',
},
calendarEl: {
sameDay: '[Σήμερα {}] LT',
nextDay: '[Αύριο {}] LT',
nextWeek: 'dddd [{}] LT',
lastDay: '[Χθες {}] LT',
lastWeek: function () {
switch (this.day()) {
case 6:
return '[το προηγούμενο] dddd [{}] LT';
default:
return '[την προηγούμενη] dddd [{}] LT';
}
},
sameElse: 'L',
},
calendar: function (key, mom) {
var output = this._calendarEl[key],
hours = mom && mom.hours();
if (isFunction(output)) {
output = output.apply(mom);
}
return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
},
relativeTime: {
future: 'σε %s',
past: '%s πριν',
s: 'λίγα δευτερόλεπτα',
ss: '%d δευτερόλεπτα',
m: 'ένα λεπτό',
mm: '%d λεπτά',
h: 'μία ώρα',
hh: '%d ώρες',
d: 'μία μέρα',
dd: '%d μέρες',
M: 'ένας μήνας',
MM: '%d μήνες',
y: 'ένας χρόνος',
yy: '%d χρόνια',
},
dayOfMonthOrdinalParse: /\d{1,2}η/,
ordinal: '%dη',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4st is the first week of the year.
},
});
return el;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-au.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-au.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (Australia) [en-au]
//! author : Jared Morse : https://github.com/jarcoal
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enAu = moment.defineLocale('en-au', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return enAu;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-ca.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-ca.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (Canada) [en-ca]
//! author : Jonathan Abourbih : https://github.com/jonbca
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enCa = moment.defineLocale('en-ca', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'YYYY-MM-DD',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY h:mm A',
LLLL: 'dddd, MMMM D, YYYY h:mm A',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
});
return enCa;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-gb.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-gb.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (United Kingdom) [en-gb]
//! author : Chris Gedrim : https://github.com/chrisgedrim
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enGb = moment.defineLocale('en-gb', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return enGb;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-ie.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-ie.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (Ireland) [en-ie]
//! author : Chris Cartlidge : https://github.com/chriscartlidge
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enIe = moment.defineLocale('en-ie', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return enIe;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-il.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-il.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (Israel) [en-il]
//! author : Chris Gedrim : https://github.com/chrisgedrim
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enIl = moment.defineLocale('en-il', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
});
return enIl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-in.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-in.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (India) [en-in]
//! author : Jatin Agrawal : https://github.com/jatinag22
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enIn = moment.defineLocale('en-in', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
});
return enIn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-nz.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-nz.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (New Zealand) [en-nz]
//! author : Luke McGregor : https://github.com/lukemcgregor
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enNz = moment.defineLocale('en-nz', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return enNz;
})));
/***/ }),
/***/ "./node_modules/moment/locale/en-sg.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/en-sg.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : English (Singapore) [en-sg]
//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var enSg = moment.defineLocale('en-sg', {
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
},
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return enSg;
})));
/***/ }),
/***/ "./node_modules/moment/locale/eo.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/eo.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Esperanto [eo]
//! author : Colin Dean : https://github.com/colindean
//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
//! comment : miestasmia corrected the translation by colindean
//! comment : Vivakvo corrected the translation by colindean and miestasmia
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var eo = moment.defineLocale('eo', {
months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
'_'
),
monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: '[la] D[-an de] MMMM, YYYY',
LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
},
meridiemParse: /[ap]\.t\.m/i,
isPM: function (input) {
return input.charAt(0).toLowerCase() === 'p';
},
meridiem: function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'p.t.m.' : 'P.T.M.';
} else {
return isLower ? 'a.t.m.' : 'A.T.M.';
}
},
calendar: {
sameDay: '[Hodiaŭ je] LT',
nextDay: '[Morgaŭ je] LT',
nextWeek: 'dddd[n je] LT',
lastDay: '[Hieraŭ je] LT',
lastWeek: '[pasintan] dddd[n je] LT',
sameElse: 'L',
},
relativeTime: {
future: 'post %s',
past: 'antaŭ %s',
s: 'kelkaj sekundoj',
ss: '%d sekundoj',
m: 'unu minuto',
mm: '%d minutoj',
h: 'unu horo',
hh: '%d horoj',
d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
dd: '%d tagoj',
M: 'unu monato',
MM: '%d monatoj',
y: 'unu jaro',
yy: '%d jaroj',
},
dayOfMonthOrdinalParse: /\d{1,2}a/,
ordinal: '%da',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return eo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/es-do.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/es-do.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Spanish (Dominican Republic) [es-do]
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
'_'
),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^may/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^sep/i,
/^oct/i,
/^nov/i,
/^dic/i,
],
monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var esDo = moment.defineLocale('es-do', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortDot;
} else if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
} else {
return monthsShortDot[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY h:mm A',
LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
},
calendar: {
sameDay: function () {
return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextDay: function () {
return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextWeek: function () {
return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastDay: function () {
return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastWeek: function () {
return (
'[el] dddd [pasado a la' +
(this.hours() !== 1 ? 's' : '') +
'] LT'
);
},
sameElse: 'L',
},
relativeTime: {
future: 'en %s',
past: 'hace %s',
s: 'unos segundos',
ss: '%d segundos',
m: 'un minuto',
mm: '%d minutos',
h: 'una hora',
hh: '%d horas',
d: 'un día',
dd: '%d días',
w: 'una semana',
ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
yy: '%d años',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return esDo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/es-mx.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/es-mx.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Spanish (Mexico) [es-mx]
//! author : JC Franco : https://github.com/jcfranco
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
'_'
),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^may/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^sep/i,
/^oct/i,
/^nov/i,
/^dic/i,
],
monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var esMx = moment.defineLocale('es-mx', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortDot;
} else if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
} else {
return monthsShortDot[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY H:mm',
LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
},
calendar: {
sameDay: function () {
return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextDay: function () {
return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextWeek: function () {
return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastDay: function () {
return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastWeek: function () {
return (
'[el] dddd [pasado a la' +
(this.hours() !== 1 ? 's' : '') +
'] LT'
);
},
sameElse: 'L',
},
relativeTime: {
future: 'en %s',
past: 'hace %s',
s: 'unos segundos',
ss: '%d segundos',
m: 'un minuto',
mm: '%d minutos',
h: 'una hora',
hh: '%d horas',
d: 'un día',
dd: '%d días',
w: 'una semana',
ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
yy: '%d años',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
invalidDate: 'Fecha inválida',
});
return esMx;
})));
/***/ }),
/***/ "./node_modules/moment/locale/es-us.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/es-us.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Spanish (United States) [es-us]
//! author : bustta : https://github.com/bustta
//! author : chrisrodz : https://github.com/chrisrodz
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
'_'
),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^may/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^sep/i,
/^oct/i,
/^nov/i,
/^dic/i,
],
monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var esUs = moment.defineLocale('es-us', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortDot;
} else if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
} else {
return monthsShortDot[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'MM/DD/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY h:mm A',
LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
},
calendar: {
sameDay: function () {
return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextDay: function () {
return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextWeek: function () {
return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastDay: function () {
return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastWeek: function () {
return (
'[el] dddd [pasado a la' +
(this.hours() !== 1 ? 's' : '') +
'] LT'
);
},
sameElse: 'L',
},
relativeTime: {
future: 'en %s',
past: 'hace %s',
s: 'unos segundos',
ss: '%d segundos',
m: 'un minuto',
mm: '%d minutos',
h: 'una hora',
hh: '%d horas',
d: 'un día',
dd: '%d días',
w: 'una semana',
ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
yy: '%d años',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return esUs;
})));
/***/ }),
/***/ "./node_modules/moment/locale/es.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/es.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Spanish [es]
//! author : Julio Napurí : https://github.com/julionc
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
'_'
),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
monthsParse = [
/^ene/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^may/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^sep/i,
/^oct/i,
/^nov/i,
/^dic/i,
],
monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var es = moment.defineLocale('es', {
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortDot;
} else if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
} else {
return monthsShortDot[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY H:mm',
LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
},
calendar: {
sameDay: function () {
return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextDay: function () {
return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
nextWeek: function () {
return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastDay: function () {
return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
},
lastWeek: function () {
return (
'[el] dddd [pasado a la' +
(this.hours() !== 1 ? 's' : '') +
'] LT'
);
},
sameElse: 'L',
},
relativeTime: {
future: 'en %s',
past: 'hace %s',
s: 'unos segundos',
ss: '%d segundos',
m: 'un minuto',
mm: '%d minutos',
h: 'una hora',
hh: '%d horas',
d: 'un día',
dd: '%d días',
w: 'una semana',
ww: '%d semanas',
M: 'un mes',
MM: '%d meses',
y: 'un año',
yy: '%d años',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
invalidDate: 'Fecha inválida',
});
return es;
})));
/***/ }),
/***/ "./node_modules/moment/locale/et.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/et.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Estonian [et]
//! author : Henry Kehlmann : https://github.com/madhenry
//! improvements : Illimar Tambek : https://github.com/ragulka
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
ss: [number + 'sekundi', number + 'sekundit'],
m: ['ühe minuti', 'üks minut'],
mm: [number + ' minuti', number + ' minutit'],
h: ['ühe tunni', 'tund aega', 'üks tund'],
hh: [number + ' tunni', number + ' tundi'],
d: ['ühe päeva', 'üks päev'],
M: ['kuu aja', 'kuu aega', 'üks kuu'],
MM: [number + ' kuu', number + ' kuud'],
y: ['ühe aasta', 'aasta', 'üks aasta'],
yy: [number + ' aasta', number + ' aastat'],
};
if (withoutSuffix) {
return format[key][2] ? format[key][2] : format[key][1];
}
return isFuture ? format[key][0] : format[key][1];
}
var et = moment.defineLocale('et', {
months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
'_'
),
monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(
'_'
),
weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
'_'
),
weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd, D. MMMM YYYY H:mm',
},
calendar: {
sameDay: '[Täna,] LT',
nextDay: '[Homme,] LT',
nextWeek: '[Järgmine] dddd LT',
lastDay: '[Eile,] LT',
lastWeek: '[Eelmine] dddd LT',
sameElse: 'L',
},
relativeTime: {
future: '%s pärast',
past: '%s tagasi',
s: processRelativeTime,
ss: processRelativeTime,
m: processRelativeTime,
mm: processRelativeTime,
h: processRelativeTime,
hh: processRelativeTime,
d: processRelativeTime,
dd: '%d päeva',
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return et;
})));
/***/ }),
/***/ "./node_modules/moment/locale/eu.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/eu.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Basque [eu]
//! author : Eneko Illarramendi : https://github.com/eillarra
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var eu = moment.defineLocale('eu', {
months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
'_'
),
monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
'_'
),
weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'YYYY[ko] MMMM[ren] D[a]',
LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
l: 'YYYY-M-D',
ll: 'YYYY[ko] MMM D[a]',
lll: 'YYYY[ko] MMM D[a] HH:mm',
llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
},
calendar: {
sameDay: '[gaur] LT[etan]',
nextDay: '[bihar] LT[etan]',
nextWeek: 'dddd LT[etan]',
lastDay: '[atzo] LT[etan]',
lastWeek: '[aurreko] dddd LT[etan]',
sameElse: 'L',
},
relativeTime: {
future: '%s barru',
past: 'duela %s',
s: 'segundo batzuk',
ss: '%d segundo',
m: 'minutu bat',
mm: '%d minutu',
h: 'ordu bat',
hh: '%d ordu',
d: 'egun bat',
dd: '%d egun',
M: 'hilabete bat',
MM: '%d hilabete',
y: 'urte bat',
yy: '%d urte',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return eu;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fa.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/fa.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Persian [fa]
//! author : Ebrahim Byagowi : https://github.com/ebraminio
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '۱',
2: '۲',
3: '۳',
4: '۴',
5: '۵',
6: '۶',
7: '۷',
8: '۸',
9: '۹',
0: '۰',
},
numberMap = {
'۱': '1',
'۲': '2',
'۳': '3',
'۴': '4',
'۵': '5',
'۶': '6',
'۷': '7',
'۸': '8',
'۹': '9',
'۰': '0',
};
var fa = moment.defineLocale('fa', {
months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
'_'
),
monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
'_'
),
weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
'_'
),
weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
'_'
),
weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
meridiemParse: /قبل از ظهر|بعد از ظهر/,
isPM: function (input) {
return /بعد از ظهر/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'قبل از ظهر';
} else {
return 'بعد از ظهر';
}
},
calendar: {
sameDay: '[امروز ساعت] LT',
nextDay: '[فردا ساعت] LT',
nextWeek: 'dddd [ساعت] LT',
lastDay: '[دیروز ساعت] LT',
lastWeek: 'dddd [پیش] [ساعت] LT',
sameElse: 'L',
},
relativeTime: {
future: 'در %s',
past: '%s پیش',
s: 'چند ثانیه',
ss: '%d ثانیه',
m: 'یک دقیقه',
mm: '%d دقیقه',
h: 'یک ساعت',
hh: '%d ساعت',
d: 'یک روز',
dd: '%d روز',
M: 'یک ماه',
MM: '%d ماه',
y: 'یک سال',
yy: '%d سال',
},
preparse: function (string) {
return string
.replace(/[۰-۹]/g, function (match) {
return numberMap[match];
})
.replace(/،/g, ',');
},
postformat: function (string) {
return string
.replace(/\d/g, function (match) {
return symbolMap[match];
})
.replace(/,/g, '،');
},
dayOfMonthOrdinalParse: /\d{1,2}م/,
ordinal: '%dم',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return fa;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fi.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/fi.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Finnish [fi]
//! author : Tarmo Aidantausta : https://github.com/bleadof
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
' '
),
numbersFuture = [
'nolla',
'yhden',
'kahden',
'kolmen',
'neljän',
'viiden',
'kuuden',
numbersPast[7],
numbersPast[8],
numbersPast[9],
];
function translate(number, withoutSuffix, key, isFuture) {
var result = '';
switch (key) {
case 's':
return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
case 'ss':
result = isFuture ? 'sekunnin' : 'sekuntia';
break;
case 'm':
return isFuture ? 'minuutin' : 'minuutti';
case 'mm':
result = isFuture ? 'minuutin' : 'minuuttia';
break;
case 'h':
return isFuture ? 'tunnin' : 'tunti';
case 'hh':
result = isFuture ? 'tunnin' : 'tuntia';
break;
case 'd':
return isFuture ? 'päivän' : 'päivä';
case 'dd':
result = isFuture ? 'päivän' : 'päivää';
break;
case 'M':
return isFuture ? 'kuukauden' : 'kuukausi';
case 'MM':
result = isFuture ? 'kuukauden' : 'kuukautta';
break;
case 'y':
return isFuture ? 'vuoden' : 'vuosi';
case 'yy':
result = isFuture ? 'vuoden' : 'vuotta';
break;
}
result = verbalNumber(number, isFuture) + ' ' + result;
return result;
}
function verbalNumber(number, isFuture) {
return number < 10
? isFuture
? numbersFuture[number]
: numbersPast[number]
: number;
}
var fi = moment.defineLocale('fi', {
months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
'_'
),
monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
'_'
),
weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
'_'
),
weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD.MM.YYYY',
LL: 'Do MMMM[ta] YYYY',
LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
l: 'D.M.YYYY',
ll: 'Do MMM YYYY',
lll: 'Do MMM YYYY, [klo] HH.mm',
llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
},
calendar: {
sameDay: '[tänään] [klo] LT',
nextDay: '[huomenna] [klo] LT',
nextWeek: 'dddd [klo] LT',
lastDay: '[eilen] [klo] LT',
lastWeek: '[viime] dddd[na] [klo] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s päästä',
past: '%s sitten',
s: translate,
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return fi;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fil.js":
/*!*******************************************!*\
!*** ./node_modules/moment/locale/fil.js ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Filipino [fil]
//! author : Dan Hagman : https://github.com/hagmandan
//! author : Matthew Co : https://github.com/matthewdeeco
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var fil = moment.defineLocale('fil', {
months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
'_'
),
monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
'_'
),
weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'MM/D/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY HH:mm',
LLLL: 'dddd, MMMM DD, YYYY HH:mm',
},
calendar: {
sameDay: 'LT [ngayong araw]',
nextDay: '[Bukas ng] LT',
nextWeek: 'LT [sa susunod na] dddd',
lastDay: 'LT [kahapon]',
lastWeek: 'LT [noong nakaraang] dddd',
sameElse: 'L',
},
relativeTime: {
future: 'sa loob ng %s',
past: '%s ang nakalipas',
s: 'ilang segundo',
ss: '%d segundo',
m: 'isang minuto',
mm: '%d minuto',
h: 'isang oras',
hh: '%d oras',
d: 'isang araw',
dd: '%d araw',
M: 'isang buwan',
MM: '%d buwan',
y: 'isang taon',
yy: '%d taon',
},
dayOfMonthOrdinalParse: /\d{1,2}/,
ordinal: function (number) {
return number;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return fil;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fo.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/fo.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Faroese [fo]
//! author : Ragnar Johannesen : https://github.com/ragnar123
//! author : Kristian Sakarisson : https://github.com/sakarisson
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var fo = moment.defineLocale('fo', {
months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
'_'
),
monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
'_'
),
weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D. MMMM, YYYY HH:mm',
},
calendar: {
sameDay: '[Í dag kl.] LT',
nextDay: '[Í morgin kl.] LT',
nextWeek: 'dddd [kl.] LT',
lastDay: '[Í gjár kl.] LT',
lastWeek: '[síðstu] dddd [kl] LT',
sameElse: 'L',
},
relativeTime: {
future: 'um %s',
past: '%s síðani',
s: 'fá sekund',
ss: '%d sekundir',
m: 'ein minuttur',
mm: '%d minuttir',
h: 'ein tími',
hh: '%d tímar',
d: 'ein dagur',
dd: '%d dagar',
M: 'ein mánaður',
MM: '%d mánaðir',
y: 'eitt ár',
yy: '%d ár',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return fo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fr-ca.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/fr-ca.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : French (Canada) [fr-ca]
//! author : Jonathan Abourbih : https://github.com/jonbca
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var frCa = moment.defineLocale('fr-ca', {
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
'_'
),
monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Aujourd’hui à] LT',
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dans %s',
past: 'il y a %s',
s: 'quelques secondes',
ss: '%d secondes',
m: 'une minute',
mm: '%d minutes',
h: 'une heure',
hh: '%d heures',
d: 'un jour',
dd: '%d jours',
M: 'un mois',
MM: '%d mois',
y: 'un an',
yy: '%d ans',
},
dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
ordinal: function (number, period) {
switch (period) {
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
case 'Q':
case 'D':
case 'DDD':
case 'd':
return number + (number === 1 ? 'er' : 'e');
// Words with feminine grammatical gender: semaine
case 'w':
case 'W':
return number + (number === 1 ? 're' : 'e');
}
},
});
return frCa;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fr-ch.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/fr-ch.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : French (Switzerland) [fr-ch]
//! author : Gaspard Bucher : https://github.com/gaspard
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var frCh = moment.defineLocale('fr-ch', {
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
'_'
),
monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Aujourd’hui à] LT',
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dans %s',
past: 'il y a %s',
s: 'quelques secondes',
ss: '%d secondes',
m: 'une minute',
mm: '%d minutes',
h: 'une heure',
hh: '%d heures',
d: 'un jour',
dd: '%d jours',
M: 'un mois',
MM: '%d mois',
y: 'un an',
yy: '%d ans',
},
dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
ordinal: function (number, period) {
switch (period) {
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
case 'Q':
case 'D':
case 'DDD':
case 'd':
return number + (number === 1 ? 'er' : 'e');
// Words with feminine grammatical gender: semaine
case 'w':
case 'W':
return number + (number === 1 ? 're' : 'e');
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return frCh;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fr.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/fr.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : French [fr]
//! author : John Fischer : https://github.com/jfroffice
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
monthsShortStrictRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
monthsRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
monthsParse = [
/^janv/i,
/^févr/i,
/^mars/i,
/^avr/i,
/^mai/i,
/^juin/i,
/^juil/i,
/^août/i,
/^sept/i,
/^oct/i,
/^nov/i,
/^déc/i,
];
var fr = moment.defineLocale('fr', {
months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
'_'
),
monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
'_'
),
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: monthsStrictRegex,
monthsShortStrictRegex: monthsShortStrictRegex,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Aujourd’hui à] LT',
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dans %s',
past: 'il y a %s',
s: 'quelques secondes',
ss: '%d secondes',
m: 'une minute',
mm: '%d minutes',
h: 'une heure',
hh: '%d heures',
d: 'un jour',
dd: '%d jours',
w: 'une semaine',
ww: '%d semaines',
M: 'un mois',
MM: '%d mois',
y: 'un an',
yy: '%d ans',
},
dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
ordinal: function (number, period) {
switch (period) {
// TODO: Return 'e' when day of month > 1. Move this case inside
// block for masculine words below.
// See https://github.com/moment/moment/issues/3375
case 'D':
return number + (number === 1 ? 'er' : '');
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
case 'Q':
case 'DDD':
case 'd':
return number + (number === 1 ? 'er' : 'e');
// Words with feminine grammatical gender: semaine
case 'w':
case 'W':
return number + (number === 1 ? 're' : 'e');
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return fr;
})));
/***/ }),
/***/ "./node_modules/moment/locale/fy.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/fy.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Frisian [fy]
//! author : Robin van der Vliet : https://github.com/robin0van0der0v
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(
'_'
),
monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(
'_'
);
var fy = moment.defineLocale('fy', {
months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortWithDots;
} else if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
monthsParseExact: true,
weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
'_'
),
weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD-MM-YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[hjoed om] LT',
nextDay: '[moarn om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[juster om] LT',
lastWeek: '[ôfrûne] dddd [om] LT',
sameElse: 'L',
},
relativeTime: {
future: 'oer %s',
past: '%s lyn',
s: 'in pear sekonden',
ss: '%d sekonden',
m: 'ien minút',
mm: '%d minuten',
h: 'ien oere',
hh: '%d oeren',
d: 'ien dei',
dd: '%d dagen',
M: 'ien moanne',
MM: '%d moannen',
y: 'ien jier',
yy: '%d jierren',
},
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
ordinal: function (number) {
return (
number +
(number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return fy;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ga.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ga.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Irish or Irish Gaelic [ga]
//! author : André Silva : https://github.com/askpt
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = [
'Eanáir',
'Feabhra',
'Márta',
'Aibreán',
'Bealtaine',
'Meitheamh',
'Iúil',
'Lúnasa',
'Meán Fómhair',
'Deireadh Fómhair',
'Samhain',
'Nollaig',
],
monthsShort = [
'Ean',
'Feabh',
'Márt',
'Aib',
'Beal',
'Meith',
'Iúil',
'Lún',
'M.F.',
'D.F.',
'Samh',
'Noll',
],
weekdays = [
'Dé Domhnaigh',
'Dé Luain',
'Dé Máirt',
'Dé Céadaoin',
'Déardaoin',
'Dé hAoine',
'Dé Sathairn',
],
weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
var ga = moment.defineLocale('ga', {
months: months,
monthsShort: monthsShort,
monthsParseExact: true,
weekdays: weekdays,
weekdaysShort: weekdaysShort,
weekdaysMin: weekdaysMin,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Inniu ag] LT',
nextDay: '[Amárach ag] LT',
nextWeek: 'dddd [ag] LT',
lastDay: '[Inné ag] LT',
lastWeek: 'dddd [seo caite] [ag] LT',
sameElse: 'L',
},
relativeTime: {
future: 'i %s',
past: '%s ó shin',
s: 'cúpla soicind',
ss: '%d soicind',
m: 'nóiméad',
mm: '%d nóiméad',
h: 'uair an chloig',
hh: '%d uair an chloig',
d: 'lá',
dd: '%d lá',
M: 'mí',
MM: '%d míonna',
y: 'bliain',
yy: '%d bliain',
},
dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
ordinal: function (number) {
var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return ga;
})));
/***/ }),
/***/ "./node_modules/moment/locale/gd.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/gd.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Scottish Gaelic [gd]
//! author : Jon Ashdown : https://github.com/jonashdown
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = [
'Am Faoilleach',
'An Gearran',
'Am Màrt',
'An Giblean',
'An Cèitean',
'An t-Ògmhios',
'An t-Iuchar',
'An Lùnastal',
'An t-Sultain',
'An Dàmhair',
'An t-Samhain',
'An Dùbhlachd',
],
monthsShort = [
'Faoi',
'Gear',
'Màrt',
'Gibl',
'Cèit',
'Ògmh',
'Iuch',
'Lùn',
'Sult',
'Dàmh',
'Samh',
'Dùbh',
],
weekdays = [
'Didòmhnaich',
'Diluain',
'Dimàirt',
'Diciadain',
'Diardaoin',
'Dihaoine',
'Disathairne',
],
weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
var gd = moment.defineLocale('gd', {
months: months,
monthsShort: monthsShort,
monthsParseExact: true,
weekdays: weekdays,
weekdaysShort: weekdaysShort,
weekdaysMin: weekdaysMin,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[An-diugh aig] LT',
nextDay: '[A-màireach aig] LT',
nextWeek: 'dddd [aig] LT',
lastDay: '[An-dè aig] LT',
lastWeek: 'dddd [seo chaidh] [aig] LT',
sameElse: 'L',
},
relativeTime: {
future: 'ann an %s',
past: 'bho chionn %s',
s: 'beagan diogan',
ss: '%d diogan',
m: 'mionaid',
mm: '%d mionaidean',
h: 'uair',
hh: '%d uairean',
d: 'latha',
dd: '%d latha',
M: 'mìos',
MM: '%d mìosan',
y: 'bliadhna',
yy: '%d bliadhna',
},
dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
ordinal: function (number) {
var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return gd;
})));
/***/ }),
/***/ "./node_modules/moment/locale/gl.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/gl.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Galician [gl]
//! author : Juan G. Hurtado : https://github.com/juanghurtado
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var gl = moment.defineLocale('gl', {
months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
'_'
),
monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY H:mm',
LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
},
calendar: {
sameDay: function () {
return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
},
nextDay: function () {
return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
},
nextWeek: function () {
return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
},
lastDay: function () {
return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
},
lastWeek: function () {
return (
'[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
);
},
sameElse: 'L',
},
relativeTime: {
future: function (str) {
if (str.indexOf('un') === 0) {
return 'n' + str;
}
return 'en ' + str;
},
past: 'hai %s',
s: 'uns segundos',
ss: '%d segundos',
m: 'un minuto',
mm: '%d minutos',
h: 'unha hora',
hh: '%d horas',
d: 'un día',
dd: '%d días',
M: 'un mes',
MM: '%d meses',
y: 'un ano',
yy: '%d anos',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return gl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/gom-deva.js":
/*!************************************************!*\
!*** ./node_modules/moment/locale/gom-deva.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Konkani Devanagari script [gom-deva]
//! author : The Discoverer : https://github.com/WikiDiscoverer
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
m: ['एका मिणटान', 'एक मिनूट'],
mm: [number + ' मिणटांनी', number + ' मिणटां'],
h: ['एका वरान', 'एक वर'],
hh: [number + ' वरांनी', number + ' वरां'],
d: ['एका दिसान', 'एक दीस'],
dd: [number + ' दिसांनी', number + ' दीस'],
M: ['एका म्हयन्यान', 'एक म्हयनो'],
MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
y: ['एका वर्सान', 'एक वर्स'],
yy: [number + ' वर्सांनी', number + ' वर्सां'],
};
return isFuture ? format[key][0] : format[key][1];
}
var gomDeva = moment.defineLocale('gom-deva', {
months: {
standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
'_'
),
format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
'_'
),
isFormat: /MMMM(\s)+D[oD]?/,
},
monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'A h:mm [वाजतां]',
LTS: 'A h:mm:ss [वाजतां]',
L: 'DD-MM-YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY A h:mm [वाजतां]',
LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
},
calendar: {
sameDay: '[आयज] LT',
nextDay: '[फाल्यां] LT',
nextWeek: '[फुडलो] dddd[,] LT',
lastDay: '[काल] LT',
lastWeek: '[फाटलो] dddd[,] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s',
past: '%s आदीं',
s: processRelativeTime,
ss: processRelativeTime,
m: processRelativeTime,
mm: processRelativeTime,
h: processRelativeTime,
hh: processRelativeTime,
d: processRelativeTime,
dd: processRelativeTime,
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
ordinal: function (number, period) {
switch (period) {
// the ordinal 'वेर' only applies to day of the month
case 'D':
return number + 'वेर';
default:
case 'M':
case 'Q':
case 'DDD':
case 'd':
case 'w':
case 'W':
return number;
}
},
week: {
dow: 0, // Sunday is the first day of the week
doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
},
meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'राती') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'सकाळीं') {
return hour;
} else if (meridiem === 'दनपारां') {
return hour > 12 ? hour : hour + 12;
} else if (meridiem === 'सांजे') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'राती';
} else if (hour < 12) {
return 'सकाळीं';
} else if (hour < 16) {
return 'दनपारां';
} else if (hour < 20) {
return 'सांजे';
} else {
return 'राती';
}
},
});
return gomDeva;
})));
/***/ }),
/***/ "./node_modules/moment/locale/gom-latn.js":
/*!************************************************!*\
!*** ./node_modules/moment/locale/gom-latn.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Konkani Latin script [gom-latn]
//! author : The Discoverer : https://github.com/WikiDiscoverer
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
s: ['thoddea sekondamni', 'thodde sekond'],
ss: [number + ' sekondamni', number + ' sekond'],
m: ['eka mintan', 'ek minut'],
mm: [number + ' mintamni', number + ' mintam'],
h: ['eka voran', 'ek vor'],
hh: [number + ' voramni', number + ' voram'],
d: ['eka disan', 'ek dis'],
dd: [number + ' disamni', number + ' dis'],
M: ['eka mhoinean', 'ek mhoino'],
MM: [number + ' mhoineamni', number + ' mhoine'],
y: ['eka vorsan', 'ek voros'],
yy: [number + ' vorsamni', number + ' vorsam'],
};
return isFuture ? format[key][0] : format[key][1];
}
var gomLatn = moment.defineLocale('gom-latn', {
months: {
standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
'_'
),
format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
'_'
),
isFormat: /MMMM(\s)+D[oD]?/,
},
monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(
'_'
),
monthsParseExact: true,
weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'A h:mm [vazta]',
LTS: 'A h:mm:ss [vazta]',
L: 'DD-MM-YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY A h:mm [vazta]',
LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
},
calendar: {
sameDay: '[Aiz] LT',
nextDay: '[Faleam] LT',
nextWeek: '[Fuddlo] dddd[,] LT',
lastDay: '[Kal] LT',
lastWeek: '[Fattlo] dddd[,] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s',
past: '%s adim',
s: processRelativeTime,
ss: processRelativeTime,
m: processRelativeTime,
mm: processRelativeTime,
h: processRelativeTime,
hh: processRelativeTime,
d: processRelativeTime,
dd: processRelativeTime,
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}(er)/,
ordinal: function (number, period) {
switch (period) {
// the ordinal 'er' only applies to day of the month
case 'D':
return number + 'er';
default:
case 'M':
case 'Q':
case 'DDD':
case 'd':
case 'w':
case 'W':
return number;
}
},
week: {
dow: 0, // Sunday is the first day of the week
doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
},
meridiemParse: /rati|sokallim|donparam|sanje/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'rati') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'sokallim') {
return hour;
} else if (meridiem === 'donparam') {
return hour > 12 ? hour : hour + 12;
} else if (meridiem === 'sanje') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'rati';
} else if (hour < 12) {
return 'sokallim';
} else if (hour < 16) {
return 'donparam';
} else if (hour < 20) {
return 'sanje';
} else {
return 'rati';
}
},
});
return gomLatn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/gu.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/gu.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Gujarati [gu]
//! author : Kaushik Thanki : https://github.com/Kaushik1987
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '૧',
2: '૨',
3: '૩',
4: '૪',
5: '૫',
6: '૬',
7: '૭',
8: '૮',
9: '૯',
0: '૦',
},
numberMap = {
'૧': '1',
'૨': '2',
'૩': '3',
'૪': '4',
'૫': '5',
'૬': '6',
'૭': '7',
'૮': '8',
'૯': '9',
'૦': '0',
};
var gu = moment.defineLocale('gu', {
months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
'_'
),
monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
'_'
),
weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
longDateFormat: {
LT: 'A h:mm વાગ્યે',
LTS: 'A h:mm:ss વાગ્યે',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
},
calendar: {
sameDay: '[આજ] LT',
nextDay: '[કાલે] LT',
nextWeek: 'dddd, LT',
lastDay: '[ગઇકાલે] LT',
lastWeek: '[પાછલા] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s મા',
past: '%s પહેલા',
s: 'અમુક પળો',
ss: '%d સેકંડ',
m: 'એક મિનિટ',
mm: '%d મિનિટ',
h: 'એક કલાક',
hh: '%d કલાક',
d: 'એક દિવસ',
dd: '%d દિવસ',
M: 'એક મહિનો',
MM: '%d મહિનો',
y: 'એક વર્ષ',
yy: '%d વર્ષ',
},
preparse: function (string) {
return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Gujarati notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'રાત') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'સવાર') {
return hour;
} else if (meridiem === 'બપોર') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'સાંજ') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'રાત';
} else if (hour < 10) {
return 'સવાર';
} else if (hour < 17) {
return 'બપોર';
} else if (hour < 20) {
return 'સાંજ';
} else {
return 'રાત';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return gu;
})));
/***/ }),
/***/ "./node_modules/moment/locale/he.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/he.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Hebrew [he]
//! author : Tomer Cohen : https://github.com/tomer
//! author : Moshe Simantov : https://github.com/DevelopmentIL
//! author : Tal Ater : https://github.com/TalAter
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var he = moment.defineLocale('he', {
months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
'_'
),
monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split(
'_'
),
weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [ב]MMMM YYYY',
LLL: 'D [ב]MMMM YYYY HH:mm',
LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
l: 'D/M/YYYY',
ll: 'D MMM YYYY',
lll: 'D MMM YYYY HH:mm',
llll: 'ddd, D MMM YYYY HH:mm',
},
calendar: {
sameDay: '[היום ב־]LT',
nextDay: '[מחר ב־]LT',
nextWeek: 'dddd [בשעה] LT',
lastDay: '[אתמול ב־]LT',
lastWeek: '[ביום] dddd [האחרון בשעה] LT',
sameElse: 'L',
},
relativeTime: {
future: 'בעוד %s',
past: 'לפני %s',
s: 'מספר שניות',
ss: '%d שניות',
m: 'דקה',
mm: '%d דקות',
h: 'שעה',
hh: function (number) {
if (number === 2) {
return 'שעתיים';
}
return number + ' שעות';
},
d: 'יום',
dd: function (number) {
if (number === 2) {
return 'יומיים';
}
return number + ' ימים';
},
M: 'חודש',
MM: function (number) {
if (number === 2) {
return 'חודשיים';
}
return number + ' חודשים';
},
y: 'שנה',
yy: function (number) {
if (number === 2) {
return 'שנתיים';
} else if (number % 10 === 0 && number !== 10) {
return number + ' שנה';
}
return number + ' שנים';
},
},
meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
isPM: function (input) {
return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 5) {
return 'לפנות בוקר';
} else if (hour < 10) {
return 'בבוקר';
} else if (hour < 12) {
return isLower ? 'לפנה"צ' : 'לפני הצהריים';
} else if (hour < 18) {
return isLower ? 'אחה"צ' : 'אחרי הצהריים';
} else {
return 'בערב';
}
},
});
return he;
})));
/***/ }),
/***/ "./node_modules/moment/locale/hi.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/hi.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Hindi [hi]
//! author : Mayank Singhal : https://github.com/mayanksinghal
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '१',
2: '२',
3: '३',
4: '४',
5: '५',
6: '६',
7: '७',
8: '८',
9: '९',
0: '०',
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0',
},
monthsParse = [
/^जन/i,
/^फ़र|फर/i,
/^मार्च/i,
/^अप्रै/i,
/^मई/i,
/^जून/i,
/^जुल/i,
/^अग/i,
/^सितं|सित/i,
/^अक्टू/i,
/^नव|नवं/i,
/^दिसं|दिस/i,
],
shortMonthsParse = [
/^जन/i,
/^फ़र/i,
/^मार्च/i,
/^अप्रै/i,
/^मई/i,
/^जून/i,
/^जुल/i,
/^अग/i,
/^सित/i,
/^अक्टू/i,
/^नव/i,
/^दिस/i,
];
var hi = moment.defineLocale('hi', {
months: {
format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
'_'
),
standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
'_'
),
},
monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split(
'_'
),
weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
longDateFormat: {
LT: 'A h:mm बजे',
LTS: 'A h:mm:ss बजे',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm बजे',
LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
},
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: shortMonthsParse,
monthsRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
monthsShortRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
monthsShortStrictRegex: /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
calendar: {
sameDay: '[आज] LT',
nextDay: '[कल] LT',
nextWeek: 'dddd, LT',
lastDay: '[कल] LT',
lastWeek: '[पिछले] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s में',
past: '%s पहले',
s: 'कुछ ही क्षण',
ss: '%d सेकंड',
m: 'एक मिनट',
mm: '%d मिनट',
h: 'एक घंटा',
hh: '%d घंटे',
d: 'एक दिन',
dd: '%d दिन',
M: 'एक महीने',
MM: '%d महीने',
y: 'एक वर्ष',
yy: '%d वर्ष',
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
meridiemParse: /रात|सुबह|दोपहर|शाम/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'रात') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'सुबह') {
return hour;
} else if (meridiem === 'दोपहर') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'शाम') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'रात';
} else if (hour < 10) {
return 'सुबह';
} else if (hour < 17) {
return 'दोपहर';
} else if (hour < 20) {
return 'शाम';
} else {
return 'रात';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return hi;
})));
/***/ }),
/***/ "./node_modules/moment/locale/hr.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/hr.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Croatian [hr]
//! author : Bojan Marković : https://github.com/bmarkovic
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function translate(number, withoutSuffix, key) {
var result = number + ' ';
switch (key) {
case 'ss':
if (number === 1) {
result += 'sekunda';
} else if (number === 2 || number === 3 || number === 4) {
result += 'sekunde';
} else {
result += 'sekundi';
}
return result;
case 'm':
return withoutSuffix ? 'jedna minuta' : 'jedne minute';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2 || number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minuta';
}
return result;
case 'h':
return withoutSuffix ? 'jedan sat' : 'jednog sata';
case 'hh':
if (number === 1) {
result += 'sat';
} else if (number === 2 || number === 3 || number === 4) {
result += 'sata';
} else {
result += 'sati';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dana';
}
return result;
case 'MM':
if (number === 1) {
result += 'mjesec';
} else if (number === 2 || number === 3 || number === 4) {
result += 'mjeseca';
} else {
result += 'mjeseci';
}
return result;
case 'yy':
if (number === 1) {
result += 'godina';
} else if (number === 2 || number === 3 || number === 4) {
result += 'godine';
} else {
result += 'godina';
}
return result;
}
}
var hr = moment.defineLocale('hr', {
months: {
format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
'_'
),
standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
'_'
),
},
monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
'_'
),
weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'Do MMMM YYYY',
LLL: 'Do MMMM YYYY H:mm',
LLLL: 'dddd, Do MMMM YYYY H:mm',
},
calendar: {
sameDay: '[danas u] LT',
nextDay: '[sutra u] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[u] [nedjelju] [u] LT';
case 3:
return '[u] [srijedu] [u] LT';
case 6:
return '[u] [subotu] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[u] dddd [u] LT';
}
},
lastDay: '[jučer u] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[prošlu] [nedjelju] [u] LT';
case 3:
return '[prošlu] [srijedu] [u] LT';
case 6:
return '[prošle] [subote] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[prošli] dddd [u] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: 'prije %s',
s: 'par sekundi',
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: 'dan',
dd: translate,
M: 'mjesec',
MM: translate,
y: 'godinu',
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return hr;
})));
/***/ }),
/***/ "./node_modules/moment/locale/hu.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/hu.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Hungarian [hu]
//! author : Adam Brunner : https://github.com/adambrunner
//! author : Peter Viszt : https://github.com/passatgt
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(
' '
);
function translate(number, withoutSuffix, key, isFuture) {
var num = number;
switch (key) {
case 's':
return isFuture || withoutSuffix
? 'néhány másodperc'
: 'néhány másodperce';
case 'ss':
return num + (isFuture || withoutSuffix)
? ' másodperc'
: ' másodperce';
case 'm':
return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'mm':
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'h':
return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'hh':
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'd':
return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'dd':
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'M':
return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'MM':
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'y':
return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
case 'yy':
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
}
return '';
}
function week(isFuture) {
return (
(isFuture ? '' : '[múlt] ') +
'[' +
weekEndings[this.day()] +
'] LT[-kor]'
);
}
var hu = moment.defineLocale('hu', {
months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
'_'
),
monthsShort: 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'YYYY.MM.DD.',
LL: 'YYYY. MMMM D.',
LLL: 'YYYY. MMMM D. H:mm',
LLLL: 'YYYY. MMMM D., dddd H:mm',
},
meridiemParse: /de|du/i,
isPM: function (input) {
return input.charAt(1).toLowerCase() === 'u';
},
meridiem: function (hours, minutes, isLower) {
if (hours < 12) {
return isLower === true ? 'de' : 'DE';
} else {
return isLower === true ? 'du' : 'DU';
}
},
calendar: {
sameDay: '[ma] LT[-kor]',
nextDay: '[holnap] LT[-kor]',
nextWeek: function () {
return week.call(this, true);
},
lastDay: '[tegnap] LT[-kor]',
lastWeek: function () {
return week.call(this, false);
},
sameElse: 'L',
},
relativeTime: {
future: '%s múlva',
past: '%s',
s: translate,
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return hu;
})));
/***/ }),
/***/ "./node_modules/moment/locale/hy-am.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/hy-am.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Armenian [hy-am]
//! author : Armendarabyan : https://github.com/armendarabyan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var hyAm = moment.defineLocale('hy-am', {
months: {
format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
'_'
),
standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
'_'
),
},
monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
'_'
),
weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY թ.',
LLL: 'D MMMM YYYY թ., HH:mm',
LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
},
calendar: {
sameDay: '[այսօր] LT',
nextDay: '[վաղը] LT',
lastDay: '[երեկ] LT',
nextWeek: function () {
return 'dddd [օրը ժամը] LT';
},
lastWeek: function () {
return '[անցած] dddd [օրը ժամը] LT';
},
sameElse: 'L',
},
relativeTime: {
future: '%s հետո',
past: '%s առաջ',
s: 'մի քանի վայրկյան',
ss: '%d վայրկյան',
m: 'րոպե',
mm: '%d րոպե',
h: 'ժամ',
hh: '%d ժամ',
d: 'օր',
dd: '%d օր',
M: 'ամիս',
MM: '%d ամիս',
y: 'տարի',
yy: '%d տարի',
},
meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
isPM: function (input) {
return /^(ցերեկվա|երեկոյան)$/.test(input);
},
meridiem: function (hour) {
if (hour < 4) {
return 'գիշերվա';
} else if (hour < 12) {
return 'առավոտվա';
} else if (hour < 17) {
return 'ցերեկվա';
} else {
return 'երեկոյան';
}
},
dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
ordinal: function (number, period) {
switch (period) {
case 'DDD':
case 'w':
case 'W':
case 'DDDo':
if (number === 1) {
return number + '-ին';
}
return number + '-րդ';
default:
return number;
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return hyAm;
})));
/***/ }),
/***/ "./node_modules/moment/locale/id.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/id.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Indonesian [id]
//! author : Mohammad Satrio Utomo : https://github.com/tyok
//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var id = moment.defineLocale('id', {
months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [pukul] HH.mm',
LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
},
meridiemParse: /pagi|siang|sore|malam/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'pagi') {
return hour;
} else if (meridiem === 'siang') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'sore' || meridiem === 'malam') {
return hour + 12;
}
},
meridiem: function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'siang';
} else if (hours < 19) {
return 'sore';
} else {
return 'malam';
}
},
calendar: {
sameDay: '[Hari ini pukul] LT',
nextDay: '[Besok pukul] LT',
nextWeek: 'dddd [pukul] LT',
lastDay: '[Kemarin pukul] LT',
lastWeek: 'dddd [lalu pukul] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dalam %s',
past: '%s yang lalu',
s: 'beberapa detik',
ss: '%d detik',
m: 'semenit',
mm: '%d menit',
h: 'sejam',
hh: '%d jam',
d: 'sehari',
dd: '%d hari',
M: 'sebulan',
MM: '%d bulan',
y: 'setahun',
yy: '%d tahun',
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return id;
})));
/***/ }),
/***/ "./node_modules/moment/locale/is.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/is.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Icelandic [is]
//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function plural(n) {
if (n % 100 === 11) {
return true;
} else if (n % 10 === 1) {
return false;
}
return true;
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's':
return withoutSuffix || isFuture
? 'nokkrar sekúndur'
: 'nokkrum sekúndum';
case 'ss':
if (plural(number)) {
return (
result +
(withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
);
}
return result + 'sekúnda';
case 'm':
return withoutSuffix ? 'mínúta' : 'mínútu';
case 'mm':
if (plural(number)) {
return (
result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
);
} else if (withoutSuffix) {
return result + 'mínúta';
}
return result + 'mínútu';
case 'hh':
if (plural(number)) {
return (
result +
(withoutSuffix || isFuture
? 'klukkustundir'
: 'klukkustundum')
);
}
return result + 'klukkustund';
case 'd':
if (withoutSuffix) {
return 'dagur';
}
return isFuture ? 'dag' : 'degi';
case 'dd':
if (plural(number)) {
if (withoutSuffix) {
return result + 'dagar';
}
return result + (isFuture ? 'daga' : 'dögum');
} else if (withoutSuffix) {
return result + 'dagur';
}
return result + (isFuture ? 'dag' : 'degi');
case 'M':
if (withoutSuffix) {
return 'mánuður';
}
return isFuture ? 'mánuð' : 'mánuði';
case 'MM':
if (plural(number)) {
if (withoutSuffix) {
return result + 'mánuðir';
}
return result + (isFuture ? 'mánuði' : 'mánuðum');
} else if (withoutSuffix) {
return result + 'mánuður';
}
return result + (isFuture ? 'mánuð' : 'mánuði');
case 'y':
return withoutSuffix || isFuture ? 'ár' : 'ári';
case 'yy':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
}
return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
}
}
var is = moment.defineLocale('is', {
months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
'_'
),
monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
'_'
),
weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY [kl.] H:mm',
LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
},
calendar: {
sameDay: '[í dag kl.] LT',
nextDay: '[á morgun kl.] LT',
nextWeek: 'dddd [kl.] LT',
lastDay: '[í gær kl.] LT',
lastWeek: '[síðasta] dddd [kl.] LT',
sameElse: 'L',
},
relativeTime: {
future: 'eftir %s',
past: 'fyrir %s síðan',
s: translate,
ss: translate,
m: translate,
mm: translate,
h: 'klukkustund',
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return is;
})));
/***/ }),
/***/ "./node_modules/moment/locale/it-ch.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/it-ch.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Italian (Switzerland) [it-ch]
//! author : xfh : https://github.com/xfh
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var itCh = moment.defineLocale('it-ch', {
months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
'_'
),
monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
'_'
),
weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Oggi alle] LT',
nextDay: '[Domani alle] LT',
nextWeek: 'dddd [alle] LT',
lastDay: '[Ieri alle] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[la scorsa] dddd [alle] LT';
default:
return '[lo scorso] dddd [alle] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: function (s) {
return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
},
past: '%s fa',
s: 'alcuni secondi',
ss: '%d secondi',
m: 'un minuto',
mm: '%d minuti',
h: "un'ora",
hh: '%d ore',
d: 'un giorno',
dd: '%d giorni',
M: 'un mese',
MM: '%d mesi',
y: 'un anno',
yy: '%d anni',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return itCh;
})));
/***/ }),
/***/ "./node_modules/moment/locale/it.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/it.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Italian [it]
//! author : Lorenzo : https://github.com/aliem
//! author: Mattia Larentis: https://github.com/nostalgiaz
//! author: Marco : https://github.com/Manfre98
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var it = moment.defineLocale('it', {
months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
'_'
),
monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
'_'
),
weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: function () {
return (
'[Oggi a' +
(this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
']LT'
);
},
nextDay: function () {
return (
'[Domani a' +
(this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
']LT'
);
},
nextWeek: function () {
return (
'dddd [a' +
(this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
']LT'
);
},
lastDay: function () {
return (
'[Ieri a' +
(this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
']LT'
);
},
lastWeek: function () {
switch (this.day()) {
case 0:
return (
'[La scorsa] dddd [a' +
(this.hours() > 1
? 'lle '
: this.hours() === 0
? ' '
: "ll'") +
']LT'
);
default:
return (
'[Lo scorso] dddd [a' +
(this.hours() > 1
? 'lle '
: this.hours() === 0
? ' '
: "ll'") +
']LT'
);
}
},
sameElse: 'L',
},
relativeTime: {
future: 'tra %s',
past: '%s fa',
s: 'alcuni secondi',
ss: '%d secondi',
m: 'un minuto',
mm: '%d minuti',
h: "un'ora",
hh: '%d ore',
d: 'un giorno',
dd: '%d giorni',
w: 'una settimana',
ww: '%d settimane',
M: 'un mese',
MM: '%d mesi',
y: 'un anno',
yy: '%d anni',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return it;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ja.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ja.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Japanese [ja]
//! author : LI Long : https://github.com/baryon
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ja = moment.defineLocale('ja', {
eras: [
{
since: '2019-05-01',
offset: 1,
name: '令和',
narrow: '㋿',
abbr: 'R',
},
{
since: '1989-01-08',
until: '2019-04-30',
offset: 1,
name: '平成',
narrow: '㍻',
abbr: 'H',
},
{
since: '1926-12-25',
until: '1989-01-07',
offset: 1,
name: '昭和',
narrow: '㍼',
abbr: 'S',
},
{
since: '1912-07-30',
until: '1926-12-24',
offset: 1,
name: '大正',
narrow: '㍽',
abbr: 'T',
},
{
since: '1873-01-01',
until: '1912-07-29',
offset: 6,
name: '明治',
narrow: '㍾',
abbr: 'M',
},
{
since: '0001-01-01',
until: '1873-12-31',
offset: 1,
name: '西暦',
narrow: 'AD',
abbr: 'AD',
},
{
since: '0000-12-31',
until: -Infinity,
offset: 1,
name: '紀元前',
narrow: 'BC',
abbr: 'BC',
},
],
eraYearOrdinalRegex: /(元|\d+)年/,
eraYearOrdinalParse: function (input, match) {
return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
},
months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
'_'
),
weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日 HH:mm',
LLLL: 'YYYY年M月D日 dddd HH:mm',
l: 'YYYY/MM/DD',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日(ddd) HH:mm',
},
meridiemParse: /午前|午後/i,
isPM: function (input) {
return input === '午後';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return '午前';
} else {
return '午後';
}
},
calendar: {
sameDay: '[今日] LT',
nextDay: '[明日] LT',
nextWeek: function (now) {
if (now.week() !== this.week()) {
return '[来週]dddd LT';
} else {
return 'dddd LT';
}
},
lastDay: '[昨日] LT',
lastWeek: function (now) {
if (this.week() !== now.week()) {
return '[先週]dddd LT';
} else {
return 'dddd LT';
}
},
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}日/,
ordinal: function (number, period) {
switch (period) {
case 'y':
return number === 1 ? '元年' : number + '年';
case 'd':
case 'D':
case 'DDD':
return number + '日';
default:
return number;
}
},
relativeTime: {
future: '%s後',
past: '%s前',
s: '数秒',
ss: '%d秒',
m: '1分',
mm: '%d分',
h: '1時間',
hh: '%d時間',
d: '1日',
dd: '%d日',
M: '1ヶ月',
MM: '%dヶ月',
y: '1年',
yy: '%d年',
},
});
return ja;
})));
/***/ }),
/***/ "./node_modules/moment/locale/jv.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/jv.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Javanese [jv]
//! author : Rony Lantip : https://github.com/lantip
//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var jv = moment.defineLocale('jv', {
months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
'_'
),
monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [pukul] HH.mm',
LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
},
meridiemParse: /enjing|siyang|sonten|ndalu/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'enjing') {
return hour;
} else if (meridiem === 'siyang') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'sonten' || meridiem === 'ndalu') {
return hour + 12;
}
},
meridiem: function (hours, minutes, isLower) {
if (hours < 11) {
return 'enjing';
} else if (hours < 15) {
return 'siyang';
} else if (hours < 19) {
return 'sonten';
} else {
return 'ndalu';
}
},
calendar: {
sameDay: '[Dinten puniko pukul] LT',
nextDay: '[Mbenjang pukul] LT',
nextWeek: 'dddd [pukul] LT',
lastDay: '[Kala wingi pukul] LT',
lastWeek: 'dddd [kepengker pukul] LT',
sameElse: 'L',
},
relativeTime: {
future: 'wonten ing %s',
past: '%s ingkang kepengker',
s: 'sawetawis detik',
ss: '%d detik',
m: 'setunggal menit',
mm: '%d menit',
h: 'setunggal jam',
hh: '%d jam',
d: 'sedinten',
dd: '%d dinten',
M: 'sewulan',
MM: '%d wulan',
y: 'setaun',
yy: '%d taun',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return jv;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ka.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ka.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Georgian [ka]
//! author : Irakli Janiashvili : https://github.com/IrakliJani
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ka = moment.defineLocale('ka', {
months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
'_'
),
monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
weekdays: {
standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
'_'
),
format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
'_'
),
isFormat: /(წინა|შემდეგ)/,
},
weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[დღეს] LT[-ზე]',
nextDay: '[ხვალ] LT[-ზე]',
lastDay: '[გუშინ] LT[-ზე]',
nextWeek: '[შემდეგ] dddd LT[-ზე]',
lastWeek: '[წინა] dddd LT-ზე',
sameElse: 'L',
},
relativeTime: {
future: function (s) {
return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function (
$0,
$1,
$2
) {
return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
});
},
past: function (s) {
if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
return s.replace(/(ი|ე)$/, 'ის წინ');
}
if (/წელი/.test(s)) {
return s.replace(/წელი$/, 'წლის წინ');
}
return s;
},
s: 'რამდენიმე წამი',
ss: '%d წამი',
m: 'წუთი',
mm: '%d წუთი',
h: 'საათი',
hh: '%d საათი',
d: 'დღე',
dd: '%d დღე',
M: 'თვე',
MM: '%d თვე',
y: 'წელი',
yy: '%d წელი',
},
dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
ordinal: function (number) {
if (number === 0) {
return number;
}
if (number === 1) {
return number + '-ლი';
}
if (
number < 20 ||
(number <= 100 && number % 20 === 0) ||
number % 100 === 0
) {
return 'მე-' + number;
}
return number + '-ე';
},
week: {
dow: 1,
doy: 7,
},
});
return ka;
})));
/***/ }),
/***/ "./node_modules/moment/locale/kk.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/kk.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Kazakh [kk]
//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var suffixes = {
0: '-ші',
1: '-ші',
2: '-ші',
3: '-ші',
4: '-ші',
5: '-ші',
6: '-шы',
7: '-ші',
8: '-ші',
9: '-шы',
10: '-шы',
20: '-шы',
30: '-шы',
40: '-шы',
50: '-ші',
60: '-шы',
70: '-ші',
80: '-ші',
90: '-шы',
100: '-ші',
};
var kk = moment.defineLocale('kk', {
months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
'_'
),
monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
'_'
),
weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Бүгін сағат] LT',
nextDay: '[Ертең сағат] LT',
nextWeek: 'dddd [сағат] LT',
lastDay: '[Кеше сағат] LT',
lastWeek: '[Өткен аптаның] dddd [сағат] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s ішінде',
past: '%s бұрын',
s: 'бірнеше секунд',
ss: '%d секунд',
m: 'бір минут',
mm: '%d минут',
h: 'бір сағат',
hh: '%d сағат',
d: 'бір күн',
dd: '%d күн',
M: 'бір ай',
MM: '%d ай',
y: 'бір жыл',
yy: '%d жыл',
},
dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
ordinal: function (number) {
var a = number % 10,
b = number >= 100 ? 100 : null;
return number + (suffixes[number] || suffixes[a] || suffixes[b]);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return kk;
})));
/***/ }),
/***/ "./node_modules/moment/locale/km.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/km.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Cambodian [km]
//! author : Kruy Vanna : https://github.com/kruyvanna
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '១',
2: '២',
3: '៣',
4: '៤',
5: '៥',
6: '៦',
7: '៧',
8: '៨',
9: '៩',
0: '០',
},
numberMap = {
'១': '1',
'២': '2',
'៣': '3',
'៤': '4',
'៥': '5',
'៦': '6',
'៧': '7',
'៨': '8',
'៩': '9',
'០': '0',
};
var km = moment.defineLocale('km', {
months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
'_'
),
monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
'_'
),
weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
meridiemParse: /ព្រឹក|ល្ងាច/,
isPM: function (input) {
return input === 'ល្ងាច';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ព្រឹក';
} else {
return 'ល្ងាច';
}
},
calendar: {
sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
nextDay: '[ស្អែក ម៉ោង] LT',
nextWeek: 'dddd [ម៉ោង] LT',
lastDay: '[ម្សិលមិញ ម៉ោង] LT',
lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
sameElse: 'L',
},
relativeTime: {
future: '%sទៀត',
past: '%sមុន',
s: 'ប៉ុន្មានវិនាទី',
ss: '%d វិនាទី',
m: 'មួយនាទី',
mm: '%d នាទី',
h: 'មួយម៉ោង',
hh: '%d ម៉ោង',
d: 'មួយថ្ងៃ',
dd: '%d ថ្ងៃ',
M: 'មួយខែ',
MM: '%d ខែ',
y: 'មួយឆ្នាំ',
yy: '%d ឆ្នាំ',
},
dayOfMonthOrdinalParse: /ទី\d{1,2}/,
ordinal: 'ទី%d',
preparse: function (string) {
return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return km;
})));
/***/ }),
/***/ "./node_modules/moment/locale/kn.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/kn.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Kannada [kn]
//! author : Rajeev Naik : https://github.com/rajeevnaikte
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '೧',
2: '೨',
3: '೩',
4: '೪',
5: '೫',
6: '೬',
7: '೭',
8: '೮',
9: '೯',
0: '೦',
},
numberMap = {
'೧': '1',
'೨': '2',
'೩': '3',
'೪': '4',
'೫': '5',
'೬': '6',
'೭': '7',
'೮': '8',
'೯': '9',
'೦': '0',
};
var kn = moment.defineLocale('kn', {
months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
'_'
),
monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
'_'
),
monthsParseExact: true,
weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
'_'
),
weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
longDateFormat: {
LT: 'A h:mm',
LTS: 'A h:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm',
LLLL: 'dddd, D MMMM YYYY, A h:mm',
},
calendar: {
sameDay: '[ಇಂದು] LT',
nextDay: '[ನಾಳೆ] LT',
nextWeek: 'dddd, LT',
lastDay: '[ನಿನ್ನೆ] LT',
lastWeek: '[ಕೊನೆಯ] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s ನಂತರ',
past: '%s ಹಿಂದೆ',
s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
ss: '%d ಸೆಕೆಂಡುಗಳು',
m: 'ಒಂದು ನಿಮಿಷ',
mm: '%d ನಿಮಿಷ',
h: 'ಒಂದು ಗಂಟೆ',
hh: '%d ಗಂಟೆ',
d: 'ಒಂದು ದಿನ',
dd: '%d ದಿನ',
M: 'ಒಂದು ತಿಂಗಳು',
MM: '%d ತಿಂಗಳು',
y: 'ಒಂದು ವರ್ಷ',
yy: '%d ವರ್ಷ',
},
preparse: function (string) {
return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'ರಾತ್ರಿ') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
return hour;
} else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'ಸಂಜೆ') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'ರಾತ್ರಿ';
} else if (hour < 10) {
return 'ಬೆಳಿಗ್ಗೆ';
} else if (hour < 17) {
return 'ಮಧ್ಯಾಹ್ನ';
} else if (hour < 20) {
return 'ಸಂಜೆ';
} else {
return 'ರಾತ್ರಿ';
}
},
dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
ordinal: function (number) {
return number + 'ನೇ';
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return kn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ko.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ko.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Korean [ko]
//! author : Kyungwook, Park : https://github.com/kyungw00k
//! author : Jeeeyul Lee
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ko = moment.defineLocale('ko', {
months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
'_'
),
weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
longDateFormat: {
LT: 'A h:mm',
LTS: 'A h:mm:ss',
L: 'YYYY.MM.DD.',
LL: 'YYYY년 MMMM D일',
LLL: 'YYYY년 MMMM D일 A h:mm',
LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
l: 'YYYY.MM.DD.',
ll: 'YYYY년 MMMM D일',
lll: 'YYYY년 MMMM D일 A h:mm',
llll: 'YYYY년 MMMM D일 dddd A h:mm',
},
calendar: {
sameDay: '오늘 LT',
nextDay: '내일 LT',
nextWeek: 'dddd LT',
lastDay: '어제 LT',
lastWeek: '지난주 dddd LT',
sameElse: 'L',
},
relativeTime: {
future: '%s 후',
past: '%s 전',
s: '몇 초',
ss: '%d초',
m: '1분',
mm: '%d분',
h: '한 시간',
hh: '%d시간',
d: '하루',
dd: '%d일',
M: '한 달',
MM: '%d달',
y: '일 년',
yy: '%d년',
},
dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '일';
case 'M':
return number + '월';
case 'w':
case 'W':
return number + '주';
default:
return number;
}
},
meridiemParse: /오전|오후/,
isPM: function (token) {
return token === '오후';
},
meridiem: function (hour, minute, isUpper) {
return hour < 12 ? '오전' : '오후';
},
});
return ko;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ku.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ku.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Kurdish [ku]
//! author : Shahram Mebashar : https://github.com/ShahramMebashar
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '١',
2: '٢',
3: '٣',
4: '٤',
5: '٥',
6: '٦',
7: '٧',
8: '٨',
9: '٩',
0: '٠',
},
numberMap = {
'١': '1',
'٢': '2',
'٣': '3',
'٤': '4',
'٥': '5',
'٦': '6',
'٧': '7',
'٨': '8',
'٩': '9',
'٠': '0',
},
months = [
'کانونی دووەم',
'شوبات',
'ئازار',
'نیسان',
'ئایار',
'حوزەیران',
'تەمموز',
'ئاب',
'ئەیلوول',
'تشرینی یەكەم',
'تشرینی دووەم',
'كانونی یەکەم',
];
var ku = moment.defineLocale('ku', {
months: months,
monthsShort: months,
weekdays: 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
'_'
),
weekdaysShort: 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split(
'_'
),
weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
meridiemParse: /ئێواره|بهیانی/,
isPM: function (input) {
return /ئێواره/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'بهیانی';
} else {
return 'ئێواره';
}
},
calendar: {
sameDay: '[ئهمرۆ كاتژمێر] LT',
nextDay: '[بهیانی كاتژمێر] LT',
nextWeek: 'dddd [كاتژمێر] LT',
lastDay: '[دوێنێ كاتژمێر] LT',
lastWeek: 'dddd [كاتژمێر] LT',
sameElse: 'L',
},
relativeTime: {
future: 'له %s',
past: '%s',
s: 'چهند چركهیهك',
ss: 'چركه %d',
m: 'یهك خولهك',
mm: '%d خولهك',
h: 'یهك كاتژمێر',
hh: '%d كاتژمێر',
d: 'یهك ڕۆژ',
dd: '%d ڕۆژ',
M: 'یهك مانگ',
MM: '%d مانگ',
y: 'یهك ساڵ',
yy: '%d ساڵ',
},
preparse: function (string) {
return string
.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
})
.replace(/،/g, ',');
},
postformat: function (string) {
return string
.replace(/\d/g, function (match) {
return symbolMap[match];
})
.replace(/,/g, '،');
},
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return ku;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ky.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ky.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Kyrgyz [ky]
//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var suffixes = {
0: '-чү',
1: '-чи',
2: '-чи',
3: '-чү',
4: '-чү',
5: '-чи',
6: '-чы',
7: '-чи',
8: '-чи',
9: '-чу',
10: '-чу',
20: '-чы',
30: '-чу',
40: '-чы',
50: '-чү',
60: '-чы',
70: '-чи',
80: '-чи',
90: '-чу',
100: '-чү',
};
var ky = moment.defineLocale('ky', {
months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
'_'
),
monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
'_'
),
weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
'_'
),
weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Бүгүн саат] LT',
nextDay: '[Эртең саат] LT',
nextWeek: 'dddd [саат] LT',
lastDay: '[Кечээ саат] LT',
lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s ичинде',
past: '%s мурун',
s: 'бирнече секунд',
ss: '%d секунд',
m: 'бир мүнөт',
mm: '%d мүнөт',
h: 'бир саат',
hh: '%d саат',
d: 'бир күн',
dd: '%d күн',
M: 'бир ай',
MM: '%d ай',
y: 'бир жыл',
yy: '%d жыл',
},
dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
ordinal: function (number) {
var a = number % 10,
b = number >= 100 ? 100 : null;
return number + (suffixes[number] || suffixes[a] || suffixes[b]);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return ky;
})));
/***/ }),
/***/ "./node_modules/moment/locale/lb.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/lb.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Luxembourgish [lb]
//! author : mweimerskirch : https://github.com/mweimerskirch
//! author : David Raison : https://github.com/kwisatz
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
m: ['eng Minutt', 'enger Minutt'],
h: ['eng Stonn', 'enger Stonn'],
d: ['een Dag', 'engem Dag'],
M: ['ee Mount', 'engem Mount'],
y: ['ee Joer', 'engem Joer'],
};
return withoutSuffix ? format[key][0] : format[key][1];
}
function processFutureTime(string) {
var number = string.substr(0, string.indexOf(' '));
if (eifelerRegelAppliesToNumber(number)) {
return 'a ' + string;
}
return 'an ' + string;
}
function processPastTime(string) {
var number = string.substr(0, string.indexOf(' '));
if (eifelerRegelAppliesToNumber(number)) {
return 'viru ' + string;
}
return 'virun ' + string;
}
/**
* Returns true if the word before the given number loses the '-n' ending.
* e.g. 'an 10 Deeg' but 'a 5 Deeg'
*
* @param number {integer}
* @returns {boolean}
*/
function eifelerRegelAppliesToNumber(number) {
number = parseInt(number, 10);
if (isNaN(number)) {
return false;
}
if (number < 0) {
// Negative Number --> always true
return true;
} else if (number < 10) {
// Only 1 digit
if (4 <= number && number <= 7) {
return true;
}
return false;
} else if (number < 100) {
// 2 digits
var lastDigit = number % 10,
firstDigit = number / 10;
if (lastDigit === 0) {
return eifelerRegelAppliesToNumber(firstDigit);
}
return eifelerRegelAppliesToNumber(lastDigit);
} else if (number < 10000) {
// 3 or 4 digits --> recursively check first digit
while (number >= 10) {
number = number / 10;
}
return eifelerRegelAppliesToNumber(number);
} else {
// Anything larger than 4 digits: recursively check first n-3 digits
number = number / 1000;
return eifelerRegelAppliesToNumber(number);
}
}
var lb = moment.defineLocale('lb', {
months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
'_'
),
monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
'_'
),
weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm [Auer]',
LTS: 'H:mm:ss [Auer]',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm [Auer]',
LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
},
calendar: {
sameDay: '[Haut um] LT',
sameElse: 'L',
nextDay: '[Muer um] LT',
nextWeek: 'dddd [um] LT',
lastDay: '[Gëschter um] LT',
lastWeek: function () {
// Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
switch (this.day()) {
case 2:
case 4:
return '[Leschten] dddd [um] LT';
default:
return '[Leschte] dddd [um] LT';
}
},
},
relativeTime: {
future: processFutureTime,
past: processPastTime,
s: 'e puer Sekonnen',
ss: '%d Sekonnen',
m: processRelativeTime,
mm: '%d Minutten',
h: processRelativeTime,
hh: '%d Stonnen',
d: processRelativeTime,
dd: '%d Deeg',
M: processRelativeTime,
MM: '%d Méint',
y: processRelativeTime,
yy: '%d Joer',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return lb;
})));
/***/ }),
/***/ "./node_modules/moment/locale/lo.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/lo.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Lao [lo]
//! author : Ryan Hart : https://github.com/ryanhart2
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var lo = moment.defineLocale('lo', {
months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
'_'
),
monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
'_'
),
weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
},
meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
isPM: function (input) {
return input === 'ຕອນແລງ';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ຕອນເຊົ້າ';
} else {
return 'ຕອນແລງ';
}
},
calendar: {
sameDay: '[ມື້ນີ້ເວລາ] LT',
nextDay: '[ມື້ອື່ນເວລາ] LT',
nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
lastDay: '[ມື້ວານນີ້ເວລາ] LT',
lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
sameElse: 'L',
},
relativeTime: {
future: 'ອີກ %s',
past: '%sຜ່ານມາ',
s: 'ບໍ່ເທົ່າໃດວິນາທີ',
ss: '%d ວິນາທີ',
m: '1 ນາທີ',
mm: '%d ນາທີ',
h: '1 ຊົ່ວໂມງ',
hh: '%d ຊົ່ວໂມງ',
d: '1 ມື້',
dd: '%d ມື້',
M: '1 ເດືອນ',
MM: '%d ເດືອນ',
y: '1 ປີ',
yy: '%d ປີ',
},
dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
ordinal: function (number) {
return 'ທີ່' + number;
},
});
return lo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/lt.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/lt.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Lithuanian [lt]
//! author : Mindaugas Mozūras : https://github.com/mmozuras
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var units = {
ss: 'sekundė_sekundžių_sekundes',
m: 'minutė_minutės_minutę',
mm: 'minutės_minučių_minutes',
h: 'valanda_valandos_valandą',
hh: 'valandos_valandų_valandas',
d: 'diena_dienos_dieną',
dd: 'dienos_dienų_dienas',
M: 'mėnuo_mėnesio_mėnesį',
MM: 'mėnesiai_mėnesių_mėnesius',
y: 'metai_metų_metus',
yy: 'metai_metų_metus',
};
function translateSeconds(number, withoutSuffix, key, isFuture) {
if (withoutSuffix) {
return 'kelios sekundės';
} else {
return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
}
}
function translateSingular(number, withoutSuffix, key, isFuture) {
return withoutSuffix
? forms(key)[0]
: isFuture
? forms(key)[1]
: forms(key)[2];
}
function special(number) {
return number % 10 === 0 || (number > 10 && number < 20);
}
function forms(key) {
return units[key].split('_');
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
if (number === 1) {
return (
result + translateSingular(number, withoutSuffix, key[0], isFuture)
);
} else if (withoutSuffix) {
return result + (special(number) ? forms(key)[1] : forms(key)[0]);
} else {
if (isFuture) {
return result + forms(key)[1];
} else {
return result + (special(number) ? forms(key)[1] : forms(key)[2]);
}
}
}
var lt = moment.defineLocale('lt', {
months: {
format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
'_'
),
standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
'_'
),
isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
},
monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
weekdays: {
format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
'_'
),
standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
'_'
),
isFormat: /dddd HH:mm/,
},
weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'YYYY [m.] MMMM D [d.]',
LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
l: 'YYYY-MM-DD',
ll: 'YYYY [m.] MMMM D [d.]',
lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
},
calendar: {
sameDay: '[Šiandien] LT',
nextDay: '[Rytoj] LT',
nextWeek: 'dddd LT',
lastDay: '[Vakar] LT',
lastWeek: '[Praėjusį] dddd LT',
sameElse: 'L',
},
relativeTime: {
future: 'po %s',
past: 'prieš %s',
s: translateSeconds,
ss: translate,
m: translateSingular,
mm: translate,
h: translateSingular,
hh: translate,
d: translateSingular,
dd: translate,
M: translateSingular,
MM: translate,
y: translateSingular,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}-oji/,
ordinal: function (number) {
return number + '-oji';
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return lt;
})));
/***/ }),
/***/ "./node_modules/moment/locale/lv.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/lv.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Latvian [lv]
//! author : Kristaps Karlsons : https://github.com/skakri
//! author : Jānis Elmeris : https://github.com/JanisE
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var units = {
ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
h: 'stundas_stundām_stunda_stundas'.split('_'),
hh: 'stundas_stundām_stunda_stundas'.split('_'),
d: 'dienas_dienām_diena_dienas'.split('_'),
dd: 'dienas_dienām_diena_dienas'.split('_'),
M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
y: 'gada_gadiem_gads_gadi'.split('_'),
yy: 'gada_gadiem_gads_gadi'.split('_'),
};
/**
* @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
*/
function format(forms, number, withoutSuffix) {
if (withoutSuffix) {
// E.g. "21 minūte", "3 minūtes".
return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
} else {
// E.g. "21 minūtes" as in "pēc 21 minūtes".
// E.g. "3 minūtēm" as in "pēc 3 minūtēm".
return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
}
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
function relativeTimeWithSingular(number, withoutSuffix, key) {
return format(units[key], number, withoutSuffix);
}
function relativeSeconds(number, withoutSuffix) {
return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
}
var lv = moment.defineLocale('lv', {
months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
'_'
),
monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
'_'
),
weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY.',
LL: 'YYYY. [gada] D. MMMM',
LLL: 'YYYY. [gada] D. MMMM, HH:mm',
LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
},
calendar: {
sameDay: '[Šodien pulksten] LT',
nextDay: '[Rīt pulksten] LT',
nextWeek: 'dddd [pulksten] LT',
lastDay: '[Vakar pulksten] LT',
lastWeek: '[Pagājušā] dddd [pulksten] LT',
sameElse: 'L',
},
relativeTime: {
future: 'pēc %s',
past: 'pirms %s',
s: relativeSeconds,
ss: relativeTimeWithPlural,
m: relativeTimeWithSingular,
mm: relativeTimeWithPlural,
h: relativeTimeWithSingular,
hh: relativeTimeWithPlural,
d: relativeTimeWithSingular,
dd: relativeTimeWithPlural,
M: relativeTimeWithSingular,
MM: relativeTimeWithPlural,
y: relativeTimeWithSingular,
yy: relativeTimeWithPlural,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return lv;
})));
/***/ }),
/***/ "./node_modules/moment/locale/me.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/me.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Montenegrin [me]
//! author : Miodrag Nikač : https://github.com/miodragnikac
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var translator = {
words: {
//Different grammatical cases
ss: ['sekund', 'sekunda', 'sekundi'],
m: ['jedan minut', 'jednog minuta'],
mm: ['minut', 'minuta', 'minuta'],
h: ['jedan sat', 'jednog sata'],
hh: ['sat', 'sata', 'sati'],
dd: ['dan', 'dana', 'dana'],
MM: ['mjesec', 'mjeseca', 'mjeseci'],
yy: ['godina', 'godine', 'godina'],
},
correctGrammaticalCase: function (number, wordKey) {
return number === 1
? wordKey[0]
: number >= 2 && number <= 4
? wordKey[1]
: wordKey[2];
},
translate: function (number, withoutSuffix, key) {
var wordKey = translator.words[key];
if (key.length === 1) {
return withoutSuffix ? wordKey[0] : wordKey[1];
} else {
return (
number +
' ' +
translator.correctGrammaticalCase(number, wordKey)
);
}
},
};
var me = moment.defineLocale('me', {
months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
'_'
),
monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
'_'
),
weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd, D. MMMM YYYY H:mm',
},
calendar: {
sameDay: '[danas u] LT',
nextDay: '[sjutra u] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[u] [nedjelju] [u] LT';
case 3:
return '[u] [srijedu] [u] LT';
case 6:
return '[u] [subotu] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[u] dddd [u] LT';
}
},
lastDay: '[juče u] LT',
lastWeek: function () {
var lastWeekDays = [
'[prošle] [nedjelje] [u] LT',
'[prošlog] [ponedjeljka] [u] LT',
'[prošlog] [utorka] [u] LT',
'[prošle] [srijede] [u] LT',
'[prošlog] [četvrtka] [u] LT',
'[prošlog] [petka] [u] LT',
'[prošle] [subote] [u] LT',
];
return lastWeekDays[this.day()];
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: 'prije %s',
s: 'nekoliko sekundi',
ss: translator.translate,
m: translator.translate,
mm: translator.translate,
h: translator.translate,
hh: translator.translate,
d: 'dan',
dd: translator.translate,
M: 'mjesec',
MM: translator.translate,
y: 'godinu',
yy: translator.translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return me;
})));
/***/ }),
/***/ "./node_modules/moment/locale/mi.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/mi.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Maori [mi]
//! author : John Corrigan : https://github.com/johnideal
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var mi = moment.defineLocale('mi', {
months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
'_'
),
monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
'_'
),
monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [i] HH:mm',
LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
},
calendar: {
sameDay: '[i teie mahana, i] LT',
nextDay: '[apopo i] LT',
nextWeek: 'dddd [i] LT',
lastDay: '[inanahi i] LT',
lastWeek: 'dddd [whakamutunga i] LT',
sameElse: 'L',
},
relativeTime: {
future: 'i roto i %s',
past: '%s i mua',
s: 'te hēkona ruarua',
ss: '%d hēkona',
m: 'he meneti',
mm: '%d meneti',
h: 'te haora',
hh: '%d haora',
d: 'he ra',
dd: '%d ra',
M: 'he marama',
MM: '%d marama',
y: 'he tau',
yy: '%d tau',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return mi;
})));
/***/ }),
/***/ "./node_modules/moment/locale/mk.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/mk.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Macedonian [mk]
//! author : Borislav Mickov : https://github.com/B0k0
//! author : Sashko Todorov : https://github.com/bkyceh
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var mk = moment.defineLocale('mk', {
months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
'_'
),
monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
'_'
),
weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'D.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY H:mm',
LLLL: 'dddd, D MMMM YYYY H:mm',
},
calendar: {
sameDay: '[Денес во] LT',
nextDay: '[Утре во] LT',
nextWeek: '[Во] dddd [во] LT',
lastDay: '[Вчера во] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[Изминатата] dddd [во] LT';
case 1:
case 2:
case 4:
case 5:
return '[Изминатиот] dddd [во] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'за %s',
past: 'пред %s',
s: 'неколку секунди',
ss: '%d секунди',
m: 'една минута',
mm: '%d минути',
h: 'еден час',
hh: '%d часа',
d: 'еден ден',
dd: '%d дена',
M: 'еден месец',
MM: '%d месеци',
y: 'една година',
yy: '%d години',
},
dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal: function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return mk;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ml.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ml.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Malayalam [ml]
//! author : Floyd Pink : https://github.com/floydpink
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ml = moment.defineLocale('ml', {
months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
'_'
),
monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
'_'
),
weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
longDateFormat: {
LT: 'A h:mm -നു',
LTS: 'A h:mm:ss -നു',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm -നു',
LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
},
calendar: {
sameDay: '[ഇന്ന്] LT',
nextDay: '[നാളെ] LT',
nextWeek: 'dddd, LT',
lastDay: '[ഇന്നലെ] LT',
lastWeek: '[കഴിഞ്ഞ] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s കഴിഞ്ഞ്',
past: '%s മുൻപ്',
s: 'അൽപ നിമിഷങ്ങൾ',
ss: '%d സെക്കൻഡ്',
m: 'ഒരു മിനിറ്റ്',
mm: '%d മിനിറ്റ്',
h: 'ഒരു മണിക്കൂർ',
hh: '%d മണിക്കൂർ',
d: 'ഒരു ദിവസം',
dd: '%d ദിവസം',
M: 'ഒരു മാസം',
MM: '%d മാസം',
y: 'ഒരു വർഷം',
yy: '%d വർഷം',
},
meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (
(meridiem === 'രാത്രി' && hour >= 4) ||
meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
meridiem === 'വൈകുന്നേരം'
) {
return hour + 12;
} else {
return hour;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'രാത്രി';
} else if (hour < 12) {
return 'രാവിലെ';
} else if (hour < 17) {
return 'ഉച്ച കഴിഞ്ഞ്';
} else if (hour < 20) {
return 'വൈകുന്നേരം';
} else {
return 'രാത്രി';
}
},
});
return ml;
})));
/***/ }),
/***/ "./node_modules/moment/locale/mn.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/mn.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Mongolian [mn]
//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function translate(number, withoutSuffix, key, isFuture) {
switch (key) {
case 's':
return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
case 'ss':
return number + (withoutSuffix ? ' секунд' : ' секундын');
case 'm':
case 'mm':
return number + (withoutSuffix ? ' минут' : ' минутын');
case 'h':
case 'hh':
return number + (withoutSuffix ? ' цаг' : ' цагийн');
case 'd':
case 'dd':
return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
case 'M':
case 'MM':
return number + (withoutSuffix ? ' сар' : ' сарын');
case 'y':
case 'yy':
return number + (withoutSuffix ? ' жил' : ' жилийн');
default:
return number;
}
}
var mn = moment.defineLocale('mn', {
months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
'_'
),
monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
'_'
),
monthsParseExact: true,
weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'YYYY оны MMMMын D',
LLL: 'YYYY оны MMMMын D HH:mm',
LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
},
meridiemParse: /ҮӨ|ҮХ/i,
isPM: function (input) {
return input === 'ҮХ';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ҮӨ';
} else {
return 'ҮХ';
}
},
calendar: {
sameDay: '[Өнөөдөр] LT',
nextDay: '[Маргааш] LT',
nextWeek: '[Ирэх] dddd LT',
lastDay: '[Өчигдөр] LT',
lastWeek: '[Өнгөрсөн] dddd LT',
sameElse: 'L',
},
relativeTime: {
future: '%s дараа',
past: '%s өмнө',
s: translate,
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + ' өдөр';
default:
return number;
}
},
});
return mn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/mr.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/mr.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Marathi [mr]
//! author : Harshad Kale : https://github.com/kalehv
//! author : Vivek Athalye : https://github.com/vnathalye
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '१',
2: '२',
3: '३',
4: '४',
5: '५',
6: '६',
7: '७',
8: '८',
9: '९',
0: '०',
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0',
};
function relativeTimeMr(number, withoutSuffix, string, isFuture) {
var output = '';
if (withoutSuffix) {
switch (string) {
case 's':
output = 'काही सेकंद';
break;
case 'ss':
output = '%d सेकंद';
break;
case 'm':
output = 'एक मिनिट';
break;
case 'mm':
output = '%d मिनिटे';
break;
case 'h':
output = 'एक तास';
break;
case 'hh':
output = '%d तास';
break;
case 'd':
output = 'एक दिवस';
break;
case 'dd':
output = '%d दिवस';
break;
case 'M':
output = 'एक महिना';
break;
case 'MM':
output = '%d महिने';
break;
case 'y':
output = 'एक वर्ष';
break;
case 'yy':
output = '%d वर्षे';
break;
}
} else {
switch (string) {
case 's':
output = 'काही सेकंदां';
break;
case 'ss':
output = '%d सेकंदां';
break;
case 'm':
output = 'एका मिनिटा';
break;
case 'mm':
output = '%d मिनिटां';
break;
case 'h':
output = 'एका तासा';
break;
case 'hh':
output = '%d तासां';
break;
case 'd':
output = 'एका दिवसा';
break;
case 'dd':
output = '%d दिवसां';
break;
case 'M':
output = 'एका महिन्या';
break;
case 'MM':
output = '%d महिन्यां';
break;
case 'y':
output = 'एका वर्षा';
break;
case 'yy':
output = '%d वर्षां';
break;
}
}
return output.replace(/%d/i, number);
}
var mr = moment.defineLocale('mr', {
months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
'_'
),
monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
longDateFormat: {
LT: 'A h:mm वाजता',
LTS: 'A h:mm:ss वाजता',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm वाजता',
LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
},
calendar: {
sameDay: '[आज] LT',
nextDay: '[उद्या] LT',
nextWeek: 'dddd, LT',
lastDay: '[काल] LT',
lastWeek: '[मागील] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%sमध्ये',
past: '%sपूर्वी',
s: relativeTimeMr,
ss: relativeTimeMr,
m: relativeTimeMr,
mm: relativeTimeMr,
h: relativeTimeMr,
hh: relativeTimeMr,
d: relativeTimeMr,
dd: relativeTimeMr,
M: relativeTimeMr,
MM: relativeTimeMr,
y: relativeTimeMr,
yy: relativeTimeMr,
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
return hour;
} else if (
meridiem === 'दुपारी' ||
meridiem === 'सायंकाळी' ||
meridiem === 'रात्री'
) {
return hour >= 12 ? hour : hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour >= 0 && hour < 6) {
return 'पहाटे';
} else if (hour < 12) {
return 'सकाळी';
} else if (hour < 17) {
return 'दुपारी';
} else if (hour < 20) {
return 'सायंकाळी';
} else {
return 'रात्री';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return mr;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ms-my.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ms-my.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Malay [ms-my]
//! note : DEPRECATED, the correct one is [ms]
//! author : Weldan Jamili : https://github.com/weldan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var msMy = moment.defineLocale('ms-my', {
months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
'_'
),
monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [pukul] HH.mm',
LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
},
meridiemParse: /pagi|tengahari|petang|malam/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'pagi') {
return hour;
} else if (meridiem === 'tengahari') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'petang' || meridiem === 'malam') {
return hour + 12;
}
},
meridiem: function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'tengahari';
} else if (hours < 19) {
return 'petang';
} else {
return 'malam';
}
},
calendar: {
sameDay: '[Hari ini pukul] LT',
nextDay: '[Esok pukul] LT',
nextWeek: 'dddd [pukul] LT',
lastDay: '[Kelmarin pukul] LT',
lastWeek: 'dddd [lepas pukul] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dalam %s',
past: '%s yang lepas',
s: 'beberapa saat',
ss: '%d saat',
m: 'seminit',
mm: '%d minit',
h: 'sejam',
hh: '%d jam',
d: 'sehari',
dd: '%d hari',
M: 'sebulan',
MM: '%d bulan',
y: 'setahun',
yy: '%d tahun',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return msMy;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ms.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ms.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Malay [ms]
//! author : Weldan Jamili : https://github.com/weldan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ms = moment.defineLocale('ms', {
months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
'_'
),
monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [pukul] HH.mm',
LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
},
meridiemParse: /pagi|tengahari|petang|malam/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'pagi') {
return hour;
} else if (meridiem === 'tengahari') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'petang' || meridiem === 'malam') {
return hour + 12;
}
},
meridiem: function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'tengahari';
} else if (hours < 19) {
return 'petang';
} else {
return 'malam';
}
},
calendar: {
sameDay: '[Hari ini pukul] LT',
nextDay: '[Esok pukul] LT',
nextWeek: 'dddd [pukul] LT',
lastDay: '[Kelmarin pukul] LT',
lastWeek: 'dddd [lepas pukul] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dalam %s',
past: '%s yang lepas',
s: 'beberapa saat',
ss: '%d saat',
m: 'seminit',
mm: '%d minit',
h: 'sejam',
hh: '%d jam',
d: 'sehari',
dd: '%d hari',
M: 'sebulan',
MM: '%d bulan',
y: 'setahun',
yy: '%d tahun',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return ms;
})));
/***/ }),
/***/ "./node_modules/moment/locale/mt.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/mt.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Maltese (Malta) [mt]
//! author : Alessandro Maruccia : https://github.com/alesma
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var mt = moment.defineLocale('mt', {
months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
'_'
),
monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
'_'
),
weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Illum fil-]LT',
nextDay: '[Għada fil-]LT',
nextWeek: 'dddd [fil-]LT',
lastDay: '[Il-bieraħ fil-]LT',
lastWeek: 'dddd [li għadda] [fil-]LT',
sameElse: 'L',
},
relativeTime: {
future: 'f’ %s',
past: '%s ilu',
s: 'ftit sekondi',
ss: '%d sekondi',
m: 'minuta',
mm: '%d minuti',
h: 'siegħa',
hh: '%d siegħat',
d: 'ġurnata',
dd: '%d ġranet',
M: 'xahar',
MM: '%d xhur',
y: 'sena',
yy: '%d sni',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return mt;
})));
/***/ }),
/***/ "./node_modules/moment/locale/my.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/my.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Burmese [my]
//! author : Squar team, mysquar.com
//! author : David Rossellat : https://github.com/gholadr
//! author : Tin Aung Lin : https://github.com/thanyawzinmin
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '၁',
2: '၂',
3: '၃',
4: '၄',
5: '၅',
6: '၆',
7: '၇',
8: '၈',
9: '၉',
0: '၀',
},
numberMap = {
'၁': '1',
'၂': '2',
'၃': '3',
'၄': '4',
'၅': '5',
'၆': '6',
'၇': '7',
'၈': '8',
'၉': '9',
'၀': '0',
};
var my = moment.defineLocale('my', {
months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
'_'
),
monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
'_'
),
weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[ယနေ.] LT [မှာ]',
nextDay: '[မနက်ဖြန်] LT [မှာ]',
nextWeek: 'dddd LT [မှာ]',
lastDay: '[မနေ.က] LT [မှာ]',
lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
sameElse: 'L',
},
relativeTime: {
future: 'လာမည့် %s မှာ',
past: 'လွန်ခဲ့သော %s က',
s: 'စက္ကန်.အနည်းငယ်',
ss: '%d စက္ကန့်',
m: 'တစ်မိနစ်',
mm: '%d မိနစ်',
h: 'တစ်နာရီ',
hh: '%d နာရီ',
d: 'တစ်ရက်',
dd: '%d ရက်',
M: 'တစ်လ',
MM: '%d လ',
y: 'တစ်နှစ်',
yy: '%d နှစ်',
},
preparse: function (string) {
return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return my;
})));
/***/ }),
/***/ "./node_modules/moment/locale/nb.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/nb.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Norwegian Bokmål [nb]
//! authors : Espen Hovlandsdal : https://github.com/rexxars
//! Sigurd Gartmann : https://github.com/sigurdga
//! Stephen Ramthun : https://github.com/stephenramthun
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var nb = moment.defineLocale('nb', {
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
'_'
),
monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY [kl.] HH:mm',
LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
},
calendar: {
sameDay: '[i dag kl.] LT',
nextDay: '[i morgen kl.] LT',
nextWeek: 'dddd [kl.] LT',
lastDay: '[i går kl.] LT',
lastWeek: '[forrige] dddd [kl.] LT',
sameElse: 'L',
},
relativeTime: {
future: 'om %s',
past: '%s siden',
s: 'noen sekunder',
ss: '%d sekunder',
m: 'ett minutt',
mm: '%d minutter',
h: 'en time',
hh: '%d timer',
d: 'en dag',
dd: '%d dager',
w: 'en uke',
ww: '%d uker',
M: 'en måned',
MM: '%d måneder',
y: 'ett år',
yy: '%d år',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return nb;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ne.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ne.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Nepalese [ne]
//! author : suvash : https://github.com/suvash
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '१',
2: '२',
3: '३',
4: '४',
5: '५',
6: '६',
7: '७',
8: '८',
9: '९',
0: '०',
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0',
};
var ne = moment.defineLocale('ne', {
months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
'_'
),
monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
'_'
),
weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'Aको h:mm बजे',
LTS: 'Aको h:mm:ss बजे',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, Aको h:mm बजे',
LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'राति') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'बिहान') {
return hour;
} else if (meridiem === 'दिउँसो') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'साँझ') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 3) {
return 'राति';
} else if (hour < 12) {
return 'बिहान';
} else if (hour < 16) {
return 'दिउँसो';
} else if (hour < 20) {
return 'साँझ';
} else {
return 'राति';
}
},
calendar: {
sameDay: '[आज] LT',
nextDay: '[भोलि] LT',
nextWeek: '[आउँदो] dddd[,] LT',
lastDay: '[हिजो] LT',
lastWeek: '[गएको] dddd[,] LT',
sameElse: 'L',
},
relativeTime: {
future: '%sमा',
past: '%s अगाडि',
s: 'केही क्षण',
ss: '%d सेकेण्ड',
m: 'एक मिनेट',
mm: '%d मिनेट',
h: 'एक घण्टा',
hh: '%d घण्टा',
d: 'एक दिन',
dd: '%d दिन',
M: 'एक महिना',
MM: '%d महिना',
y: 'एक बर्ष',
yy: '%d बर्ष',
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return ne;
})));
/***/ }),
/***/ "./node_modules/moment/locale/nl-be.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/nl-be.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Dutch (Belgium) [nl-be]
//! author : Joris Röling : https://github.com/jorisroling
//! author : Jacob Middag : https://github.com/middagj
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
'_'
),
monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
'_'
),
monthsParse = [
/^jan/i,
/^feb/i,
/^maart|mrt.?$/i,
/^apr/i,
/^mei$/i,
/^jun[i.]?$/i,
/^jul[i.]?$/i,
/^aug/i,
/^sep/i,
/^okt/i,
/^nov/i,
/^dec/i,
],
monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
var nlBe = moment.defineLocale('nl-be', {
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortWithDots;
} else if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
'_'
),
weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[vandaag om] LT',
nextDay: '[morgen om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[gisteren om] LT',
lastWeek: '[afgelopen] dddd [om] LT',
sameElse: 'L',
},
relativeTime: {
future: 'over %s',
past: '%s geleden',
s: 'een paar seconden',
ss: '%d seconden',
m: 'één minuut',
mm: '%d minuten',
h: 'één uur',
hh: '%d uur',
d: 'één dag',
dd: '%d dagen',
M: 'één maand',
MM: '%d maanden',
y: 'één jaar',
yy: '%d jaar',
},
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
ordinal: function (number) {
return (
number +
(number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return nlBe;
})));
/***/ }),
/***/ "./node_modules/moment/locale/nl.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/nl.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Dutch [nl]
//! author : Joris Röling : https://github.com/jorisroling
//! author : Jacob Middag : https://github.com/middagj
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
'_'
),
monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
'_'
),
monthsParse = [
/^jan/i,
/^feb/i,
/^maart|mrt.?$/i,
/^apr/i,
/^mei$/i,
/^jun[i.]?$/i,
/^jul[i.]?$/i,
/^aug/i,
/^sep/i,
/^okt/i,
/^nov/i,
/^dec/i,
],
monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
var nl = moment.defineLocale('nl', {
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
'_'
),
monthsShort: function (m, format) {
if (!m) {
return monthsShortWithDots;
} else if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
'_'
),
weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD-MM-YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[vandaag om] LT',
nextDay: '[morgen om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[gisteren om] LT',
lastWeek: '[afgelopen] dddd [om] LT',
sameElse: 'L',
},
relativeTime: {
future: 'over %s',
past: '%s geleden',
s: 'een paar seconden',
ss: '%d seconden',
m: 'één minuut',
mm: '%d minuten',
h: 'één uur',
hh: '%d uur',
d: 'één dag',
dd: '%d dagen',
w: 'één week',
ww: '%d weken',
M: 'één maand',
MM: '%d maanden',
y: 'één jaar',
yy: '%d jaar',
},
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
ordinal: function (number) {
return (
number +
(number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return nl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/nn.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/nn.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Nynorsk [nn]
//! authors : https://github.com/mechuwind
//! Stephen Ramthun : https://github.com/stephenramthun
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var nn = moment.defineLocale('nn', {
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
'_'
),
monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY [kl.] H:mm',
LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
},
calendar: {
sameDay: '[I dag klokka] LT',
nextDay: '[I morgon klokka] LT',
nextWeek: 'dddd [klokka] LT',
lastDay: '[I går klokka] LT',
lastWeek: '[Føregåande] dddd [klokka] LT',
sameElse: 'L',
},
relativeTime: {
future: 'om %s',
past: '%s sidan',
s: 'nokre sekund',
ss: '%d sekund',
m: 'eit minutt',
mm: '%d minutt',
h: 'ein time',
hh: '%d timar',
d: 'ein dag',
dd: '%d dagar',
w: 'ei veke',
ww: '%d veker',
M: 'ein månad',
MM: '%d månader',
y: 'eit år',
yy: '%d år',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return nn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/oc-lnc.js":
/*!**********************************************!*\
!*** ./node_modules/moment/locale/oc-lnc.js ***!
\**********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Occitan, lengadocian dialecte [oc-lnc]
//! author : Quentin PAGÈS : https://github.com/Quenty31
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ocLnc = moment.defineLocale('oc-lnc', {
months: {
standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
'_'
),
format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
'_'
),
isFormat: /D[oD]?(\s)+MMMM/,
},
monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
'_'
),
weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM [de] YYYY',
ll: 'D MMM YYYY',
LLL: 'D MMMM [de] YYYY [a] H:mm',
lll: 'D MMM YYYY, H:mm',
LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
llll: 'ddd D MMM YYYY, H:mm',
},
calendar: {
sameDay: '[uèi a] LT',
nextDay: '[deman a] LT',
nextWeek: 'dddd [a] LT',
lastDay: '[ièr a] LT',
lastWeek: 'dddd [passat a] LT',
sameElse: 'L',
},
relativeTime: {
future: "d'aquí %s",
past: 'fa %s',
s: 'unas segondas',
ss: '%d segondas',
m: 'una minuta',
mm: '%d minutas',
h: 'una ora',
hh: '%d oras',
d: 'un jorn',
dd: '%d jorns',
M: 'un mes',
MM: '%d meses',
y: 'un an',
yy: '%d ans',
},
dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
ordinal: function (number, period) {
var output =
number === 1
? 'r'
: number === 2
? 'n'
: number === 3
? 'r'
: number === 4
? 't'
: 'è';
if (period === 'w' || period === 'W') {
output = 'a';
}
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4,
},
});
return ocLnc;
})));
/***/ }),
/***/ "./node_modules/moment/locale/pa-in.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/pa-in.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Punjabi (India) [pa-in]
//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '੧',
2: '੨',
3: '੩',
4: '੪',
5: '੫',
6: '੬',
7: '੭',
8: '੮',
9: '੯',
0: '੦',
},
numberMap = {
'੧': '1',
'੨': '2',
'੩': '3',
'੪': '4',
'੫': '5',
'੬': '6',
'੭': '7',
'੮': '8',
'੯': '9',
'੦': '0',
};
var paIn = moment.defineLocale('pa-in', {
// There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
'_'
),
monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
'_'
),
weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
'_'
),
weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
longDateFormat: {
LT: 'A h:mm ਵਜੇ',
LTS: 'A h:mm:ss ਵਜੇ',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
},
calendar: {
sameDay: '[ਅਜ] LT',
nextDay: '[ਕਲ] LT',
nextWeek: '[ਅਗਲਾ] dddd, LT',
lastDay: '[ਕਲ] LT',
lastWeek: '[ਪਿਛਲੇ] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s ਵਿੱਚ',
past: '%s ਪਿਛਲੇ',
s: 'ਕੁਝ ਸਕਿੰਟ',
ss: '%d ਸਕਿੰਟ',
m: 'ਇਕ ਮਿੰਟ',
mm: '%d ਮਿੰਟ',
h: 'ਇੱਕ ਘੰਟਾ',
hh: '%d ਘੰਟੇ',
d: 'ਇੱਕ ਦਿਨ',
dd: '%d ਦਿਨ',
M: 'ਇੱਕ ਮਹੀਨਾ',
MM: '%d ਮਹੀਨੇ',
y: 'ਇੱਕ ਸਾਲ',
yy: '%d ਸਾਲ',
},
preparse: function (string) {
return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Punjabi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'ਰਾਤ') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'ਸਵੇਰ') {
return hour;
} else if (meridiem === 'ਦੁਪਹਿਰ') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'ਸ਼ਾਮ') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'ਰਾਤ';
} else if (hour < 10) {
return 'ਸਵੇਰ';
} else if (hour < 17) {
return 'ਦੁਪਹਿਰ';
} else if (hour < 20) {
return 'ਸ਼ਾਮ';
} else {
return 'ਰਾਤ';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return paIn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/pl.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/pl.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Polish [pl]
//! author : Rafal Hirsz : https://github.com/evoL
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
'_'
),
monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
'_'
),
monthsParse = [
/^sty/i,
/^lut/i,
/^mar/i,
/^kwi/i,
/^maj/i,
/^cze/i,
/^lip/i,
/^sie/i,
/^wrz/i,
/^paź/i,
/^lis/i,
/^gru/i,
];
function plural(n) {
return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
}
function translate(number, withoutSuffix, key) {
var result = number + ' ';
switch (key) {
case 'ss':
return result + (plural(number) ? 'sekundy' : 'sekund');
case 'm':
return withoutSuffix ? 'minuta' : 'minutę';
case 'mm':
return result + (plural(number) ? 'minuty' : 'minut');
case 'h':
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
case 'ww':
return result + (plural(number) ? 'tygodnie' : 'tygodni');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
return result + (plural(number) ? 'lata' : 'lat');
}
}
var pl = moment.defineLocale('pl', {
months: function (momentToFormat, format) {
if (!momentToFormat) {
return monthsNominative;
} else if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
}
},
monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(
'_'
),
weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Dziś o] LT',
nextDay: '[Jutro o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[W niedzielę o] LT';
case 2:
return '[We wtorek o] LT';
case 3:
return '[W środę o] LT';
case 6:
return '[W sobotę o] LT';
default:
return '[W] dddd [o] LT';
}
},
lastDay: '[Wczoraj o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[W zeszłą niedzielę o] LT';
case 3:
return '[W zeszłą środę o] LT';
case 6:
return '[W zeszłą sobotę o] LT';
default:
return '[W zeszły] dddd [o] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: '%s temu',
s: 'kilka sekund',
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: '1 dzień',
dd: '%d dni',
w: 'tydzień',
ww: translate,
M: 'miesiąc',
MM: translate,
y: 'rok',
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return pl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/pt-br.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/pt-br.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Portuguese (Brazil) [pt-br]
//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ptBr = moment.defineLocale('pt-br', {
months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
'_'
),
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
'_'
),
weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
},
calendar: {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return this.day() === 0 || this.day() === 6
? '[Último] dddd [às] LT' // Saturday + Sunday
: '[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L',
},
relativeTime: {
future: 'em %s',
past: 'há %s',
s: 'poucos segundos',
ss: '%d segundos',
m: 'um minuto',
mm: '%d minutos',
h: 'uma hora',
hh: '%d horas',
d: 'um dia',
dd: '%d dias',
M: 'um mês',
MM: '%d meses',
y: 'um ano',
yy: '%d anos',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
invalidDate: 'Data inválida',
});
return ptBr;
})));
/***/ }),
/***/ "./node_modules/moment/locale/pt.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/pt.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Portuguese [pt]
//! author : Jefferson : https://github.com/jalex79
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var pt = moment.defineLocale('pt', {
months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
'_'
),
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
'_'
),
weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY HH:mm',
LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
},
calendar: {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return this.day() === 0 || this.day() === 6
? '[Último] dddd [às] LT' // Saturday + Sunday
: '[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L',
},
relativeTime: {
future: 'em %s',
past: 'há %s',
s: 'segundos',
ss: '%d segundos',
m: 'um minuto',
mm: '%d minutos',
h: 'uma hora',
hh: '%d horas',
d: 'um dia',
dd: '%d dias',
w: 'uma semana',
ww: '%d semanas',
M: 'um mês',
MM: '%d meses',
y: 'um ano',
yy: '%d anos',
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal: '%dº',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return pt;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ro.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ro.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Romanian [ro]
//! author : Vlad Gurdiga : https://github.com/gurdiga
//! author : Valentin Agachi : https://github.com/avaly
//! author : Emanuel Cepoi : https://github.com/cepem
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
ss: 'secunde',
mm: 'minute',
hh: 'ore',
dd: 'zile',
ww: 'săptămâni',
MM: 'luni',
yy: 'ani',
},
separator = ' ';
if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
separator = ' de ';
}
return number + separator + format[key];
}
var ro = moment.defineLocale('ro', {
months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
'_'
),
monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY H:mm',
LLLL: 'dddd, D MMMM YYYY H:mm',
},
calendar: {
sameDay: '[azi la] LT',
nextDay: '[mâine la] LT',
nextWeek: 'dddd [la] LT',
lastDay: '[ieri la] LT',
lastWeek: '[fosta] dddd [la] LT',
sameElse: 'L',
},
relativeTime: {
future: 'peste %s',
past: '%s în urmă',
s: 'câteva secunde',
ss: relativeTimeWithPlural,
m: 'un minut',
mm: relativeTimeWithPlural,
h: 'o oră',
hh: relativeTimeWithPlural,
d: 'o zi',
dd: relativeTimeWithPlural,
w: 'o săptămână',
ww: relativeTimeWithPlural,
M: 'o lună',
MM: relativeTimeWithPlural,
y: 'un an',
yy: relativeTimeWithPlural,
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return ro;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ru.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ru.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Russian [ru]
//! author : Viktorminator : https://github.com/Viktorminator
//! author : Menelion Elensúle : https://github.com/Oire
//! author : Коренберг Марк : https://github.com/socketpair
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11
? forms[0]
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
? forms[1]
: forms[2];
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
hh: 'час_часа_часов',
dd: 'день_дня_дней',
ww: 'неделя_недели_недель',
MM: 'месяц_месяца_месяцев',
yy: 'год_года_лет',
};
if (key === 'm') {
return withoutSuffix ? 'минута' : 'минуту';
} else {
return number + ' ' + plural(format[key], +number);
}
}
var monthsParse = [
/^янв/i,
/^фев/i,
/^мар/i,
/^апр/i,
/^ма[йя]/i,
/^июн/i,
/^июл/i,
/^авг/i,
/^сен/i,
/^окт/i,
/^ноя/i,
/^дек/i,
];
// http://new.gramota.ru/spravka/rules/139-prop : § 103
// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
var ru = moment.defineLocale('ru', {
months: {
format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
'_'
),
standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
'_'
),
},
monthsShort: {
// по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
'_'
),
standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
'_'
),
},
weekdays: {
standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
'_'
),
format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
'_'
),
isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
},
weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
// полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
// копия предыдущего
monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
// полные названия с падежами
monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
// Выражение, которое соответствует только сокращённым формам
monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY г.',
LLL: 'D MMMM YYYY г., H:mm',
LLLL: 'dddd, D MMMM YYYY г., H:mm',
},
calendar: {
sameDay: '[Сегодня, в] LT',
nextDay: '[Завтра, в] LT',
lastDay: '[Вчера, в] LT',
nextWeek: function (now) {
if (now.week() !== this.week()) {
switch (this.day()) {
case 0:
return '[В следующее] dddd, [в] LT';
case 1:
case 2:
case 4:
return '[В следующий] dddd, [в] LT';
case 3:
case 5:
case 6:
return '[В следующую] dddd, [в] LT';
}
} else {
if (this.day() === 2) {
return '[Во] dddd, [в] LT';
} else {
return '[В] dddd, [в] LT';
}
}
},
lastWeek: function (now) {
if (now.week() !== this.week()) {
switch (this.day()) {
case 0:
return '[В прошлое] dddd, [в] LT';
case 1:
case 2:
case 4:
return '[В прошлый] dddd, [в] LT';
case 3:
case 5:
case 6:
return '[В прошлую] dddd, [в] LT';
}
} else {
if (this.day() === 2) {
return '[Во] dddd, [в] LT';
} else {
return '[В] dddd, [в] LT';
}
}
},
sameElse: 'L',
},
relativeTime: {
future: 'через %s',
past: '%s назад',
s: 'несколько секунд',
ss: relativeTimeWithPlural,
m: relativeTimeWithPlural,
mm: relativeTimeWithPlural,
h: 'час',
hh: relativeTimeWithPlural,
d: 'день',
dd: relativeTimeWithPlural,
w: 'неделя',
ww: relativeTimeWithPlural,
M: 'месяц',
MM: relativeTimeWithPlural,
y: 'год',
yy: relativeTimeWithPlural,
},
meridiemParse: /ночи|утра|дня|вечера/i,
isPM: function (input) {
return /^(дня|вечера)$/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'ночи';
} else if (hour < 12) {
return 'утра';
} else if (hour < 17) {
return 'дня';
} else {
return 'вечера';
}
},
dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
ordinal: function (number, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
return number + '-й';
case 'D':
return number + '-го';
case 'w':
case 'W':
return number + '-я';
default:
return number;
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return ru;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sd.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sd.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Sindhi [sd]
//! author : Narain Sagar : https://github.com/narainsagar
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = [
'جنوري',
'فيبروري',
'مارچ',
'اپريل',
'مئي',
'جون',
'جولاءِ',
'آگسٽ',
'سيپٽمبر',
'آڪٽوبر',
'نومبر',
'ڊسمبر',
],
days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
var sd = moment.defineLocale('sd', {
months: months,
monthsShort: months,
weekdays: days,
weekdaysShort: days,
weekdaysMin: days,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd، D MMMM YYYY HH:mm',
},
meridiemParse: /صبح|شام/,
isPM: function (input) {
return 'شام' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'صبح';
}
return 'شام';
},
calendar: {
sameDay: '[اڄ] LT',
nextDay: '[سڀاڻي] LT',
nextWeek: 'dddd [اڳين هفتي تي] LT',
lastDay: '[ڪالهه] LT',
lastWeek: '[گزريل هفتي] dddd [تي] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s پوء',
past: '%s اڳ',
s: 'چند سيڪنڊ',
ss: '%d سيڪنڊ',
m: 'هڪ منٽ',
mm: '%d منٽ',
h: 'هڪ ڪلاڪ',
hh: '%d ڪلاڪ',
d: 'هڪ ڏينهن',
dd: '%d ڏينهن',
M: 'هڪ مهينو',
MM: '%d مهينا',
y: 'هڪ سال',
yy: '%d سال',
},
preparse: function (string) {
return string.replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/,/g, '،');
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return sd;
})));
/***/ }),
/***/ "./node_modules/moment/locale/se.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/se.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Northern Sami [se]
//! authors : Bård Rolstad Henriksen : https://github.com/karamell
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var se = moment.defineLocale('se', {
months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
'_'
),
monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split(
'_'
),
weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
'_'
),
weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'MMMM D. [b.] YYYY',
LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
},
calendar: {
sameDay: '[otne ti] LT',
nextDay: '[ihttin ti] LT',
nextWeek: 'dddd [ti] LT',
lastDay: '[ikte ti] LT',
lastWeek: '[ovddit] dddd [ti] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s geažes',
past: 'maŋit %s',
s: 'moadde sekunddat',
ss: '%d sekunddat',
m: 'okta minuhta',
mm: '%d minuhtat',
h: 'okta diimmu',
hh: '%d diimmut',
d: 'okta beaivi',
dd: '%d beaivvit',
M: 'okta mánnu',
MM: '%d mánut',
y: 'okta jahki',
yy: '%d jagit',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return se;
})));
/***/ }),
/***/ "./node_modules/moment/locale/si.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/si.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Sinhalese [si]
//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
/*jshint -W100*/
var si = moment.defineLocale('si', {
months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
'_'
),
monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
'_'
),
weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
'_'
),
weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'a h:mm',
LTS: 'a h:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY MMMM D',
LLL: 'YYYY MMMM D, a h:mm',
LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
},
calendar: {
sameDay: '[අද] LT[ට]',
nextDay: '[හෙට] LT[ට]',
nextWeek: 'dddd LT[ට]',
lastDay: '[ඊයේ] LT[ට]',
lastWeek: '[පසුගිය] dddd LT[ට]',
sameElse: 'L',
},
relativeTime: {
future: '%sකින්',
past: '%sකට පෙර',
s: 'තත්පර කිහිපය',
ss: 'තත්පර %d',
m: 'මිනිත්තුව',
mm: 'මිනිත්තු %d',
h: 'පැය',
hh: 'පැය %d',
d: 'දිනය',
dd: 'දින %d',
M: 'මාසය',
MM: 'මාස %d',
y: 'වසර',
yy: 'වසර %d',
},
dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
ordinal: function (number) {
return number + ' වැනි';
},
meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
isPM: function (input) {
return input === 'ප.ව.' || input === 'පස් වරු';
},
meridiem: function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'ප.ව.' : 'පස් වරු';
} else {
return isLower ? 'පෙ.ව.' : 'පෙර වරු';
}
},
});
return si;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sk.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sk.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Slovak [sk]
//! author : Martin Minka : https://github.com/k2s
//! based on work of petrbela : https://github.com/petrbela
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
'_'
),
monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
function plural(n) {
return n > 1 && n < 5;
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'sekundy' : 'sekúnd');
} else {
return result + 'sekundami';
}
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minúty' : 'minút');
} else {
return result + 'minútami';
}
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodín');
} else {
return result + 'hodinami';
}
case 'd': // a day / in a day / a day ago
return withoutSuffix || isFuture ? 'deň' : 'dňom';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dni' : 'dní');
} else {
return result + 'dňami';
}
case 'M': // a month / in a month / a month ago
return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'mesiace' : 'mesiacov');
} else {
return result + 'mesiacmi';
}
case 'y': // a year / in a year / a year ago
return withoutSuffix || isFuture ? 'rok' : 'rokom';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'rokov');
} else {
return result + 'rokmi';
}
}
}
var sk = moment.defineLocale('sk', {
months: months,
monthsShort: monthsShort,
weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd D. MMMM YYYY H:mm',
},
calendar: {
sameDay: '[dnes o] LT',
nextDay: '[zajtra o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v nedeľu o] LT';
case 1:
case 2:
return '[v] dddd [o] LT';
case 3:
return '[v stredu o] LT';
case 4:
return '[vo štvrtok o] LT';
case 5:
return '[v piatok o] LT';
case 6:
return '[v sobotu o] LT';
}
},
lastDay: '[včera o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulú nedeľu o] LT';
case 1:
case 2:
return '[minulý] dddd [o] LT';
case 3:
return '[minulú stredu o] LT';
case 4:
case 5:
return '[minulý] dddd [o] LT';
case 6:
return '[minulú sobotu o] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: 'pred %s',
s: translate,
ss: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return sk;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sl.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sl.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Slovenian [sl]
//! author : Robert Sedovšek : https://github.com/sedovsek
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's':
return withoutSuffix || isFuture
? 'nekaj sekund'
: 'nekaj sekundami';
case 'ss':
if (number === 1) {
result += withoutSuffix ? 'sekundo' : 'sekundi';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
} else {
result += 'sekund';
}
return result;
case 'm':
return withoutSuffix ? 'ena minuta' : 'eno minuto';
case 'mm':
if (number === 1) {
result += withoutSuffix ? 'minuta' : 'minuto';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'minute' : 'minutami';
} else {
result += withoutSuffix || isFuture ? 'minut' : 'minutami';
}
return result;
case 'h':
return withoutSuffix ? 'ena ura' : 'eno uro';
case 'hh':
if (number === 1) {
result += withoutSuffix ? 'ura' : 'uro';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'uri' : 'urama';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'ure' : 'urami';
} else {
result += withoutSuffix || isFuture ? 'ur' : 'urami';
}
return result;
case 'd':
return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
case 'dd':
if (number === 1) {
result += withoutSuffix || isFuture ? 'dan' : 'dnem';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
} else {
result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
}
return result;
case 'M':
return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
case 'MM':
if (number === 1) {
result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
} else {
result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
}
return result;
case 'y':
return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
case 'yy':
if (number === 1) {
result += withoutSuffix || isFuture ? 'leto' : 'letom';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'leti' : 'letoma';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'leta' : 'leti';
} else {
result += withoutSuffix || isFuture ? 'let' : 'leti';
}
return result;
}
}
var sl = moment.defineLocale('sl', {
months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
'_'
),
monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD. MM. YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd, D. MMMM YYYY H:mm',
},
calendar: {
sameDay: '[danes ob] LT',
nextDay: '[jutri ob] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
},
lastDay: '[včeraj ob] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[prejšnjo] [nedeljo] [ob] LT';
case 3:
return '[prejšnjo] [sredo] [ob] LT';
case 6:
return '[prejšnjo] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
},
sameElse: 'L',
},
relativeTime: {
future: 'čez %s',
past: 'pred %s',
s: processRelativeTime,
ss: processRelativeTime,
m: processRelativeTime,
mm: processRelativeTime,
h: processRelativeTime,
hh: processRelativeTime,
d: processRelativeTime,
dd: processRelativeTime,
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return sl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sq.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sq.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Albanian [sq]
//! author : Flakërim Ismani : https://github.com/flakerimi
//! author : Menelion Elensúle : https://github.com/Oire
//! author : Oerd Cukalla : https://github.com/oerd
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var sq = moment.defineLocale('sq', {
months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
'_'
),
monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
'_'
),
weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
weekdaysParseExact: true,
meridiemParse: /PD|MD/,
isPM: function (input) {
return input.charAt(0) === 'M';
},
meridiem: function (hours, minutes, isLower) {
return hours < 12 ? 'PD' : 'MD';
},
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Sot në] LT',
nextDay: '[Nesër në] LT',
nextWeek: 'dddd [në] LT',
lastDay: '[Dje në] LT',
lastWeek: 'dddd [e kaluar në] LT',
sameElse: 'L',
},
relativeTime: {
future: 'në %s',
past: '%s më parë',
s: 'disa sekonda',
ss: '%d sekonda',
m: 'një minutë',
mm: '%d minuta',
h: 'një orë',
hh: '%d orë',
d: 'një ditë',
dd: '%d ditë',
M: 'një muaj',
MM: '%d muaj',
y: 'një vit',
yy: '%d vite',
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return sq;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sr-cyrl.js":
/*!***********************************************!*\
!*** ./node_modules/moment/locale/sr-cyrl.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Serbian Cyrillic [sr-cyrl]
//! author : Milan Janačković : https://github.com/milan-j
//! author : Stefan Crnjaković : https://github.com/crnjakovic
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var translator = {
words: {
//Different grammatical cases
ss: ['секунда', 'секунде', 'секунди'],
m: ['један минут', 'једне минуте'],
mm: ['минут', 'минуте', 'минута'],
h: ['један сат', 'једног сата'],
hh: ['сат', 'сата', 'сати'],
dd: ['дан', 'дана', 'дана'],
MM: ['месец', 'месеца', 'месеци'],
yy: ['година', 'године', 'година'],
},
correctGrammaticalCase: function (number, wordKey) {
return number === 1
? wordKey[0]
: number >= 2 && number <= 4
? wordKey[1]
: wordKey[2];
},
translate: function (number, withoutSuffix, key) {
var wordKey = translator.words[key];
if (key.length === 1) {
return withoutSuffix ? wordKey[0] : wordKey[1];
} else {
return (
number +
' ' +
translator.correctGrammaticalCase(number, wordKey)
);
}
},
};
var srCyrl = moment.defineLocale('sr-cyrl', {
months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
'_'
),
monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'D. M. YYYY.',
LL: 'D. MMMM YYYY.',
LLL: 'D. MMMM YYYY. H:mm',
LLLL: 'dddd, D. MMMM YYYY. H:mm',
},
calendar: {
sameDay: '[данас у] LT',
nextDay: '[сутра у] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[у] [недељу] [у] LT';
case 3:
return '[у] [среду] [у] LT';
case 6:
return '[у] [суботу] [у] LT';
case 1:
case 2:
case 4:
case 5:
return '[у] dddd [у] LT';
}
},
lastDay: '[јуче у] LT',
lastWeek: function () {
var lastWeekDays = [
'[прошле] [недеље] [у] LT',
'[прошлог] [понедељка] [у] LT',
'[прошлог] [уторка] [у] LT',
'[прошле] [среде] [у] LT',
'[прошлог] [четвртка] [у] LT',
'[прошлог] [петка] [у] LT',
'[прошле] [суботе] [у] LT',
];
return lastWeekDays[this.day()];
},
sameElse: 'L',
},
relativeTime: {
future: 'за %s',
past: 'пре %s',
s: 'неколико секунди',
ss: translator.translate,
m: translator.translate,
mm: translator.translate,
h: translator.translate,
hh: translator.translate,
d: 'дан',
dd: translator.translate,
M: 'месец',
MM: translator.translate,
y: 'годину',
yy: translator.translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
});
return srCyrl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sr.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sr.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Serbian [sr]
//! author : Milan Janačković : https://github.com/milan-j
//! author : Stefan Crnjaković : https://github.com/crnjakovic
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var translator = {
words: {
//Different grammatical cases
ss: ['sekunda', 'sekunde', 'sekundi'],
m: ['jedan minut', 'jedne minute'],
mm: ['minut', 'minute', 'minuta'],
h: ['jedan sat', 'jednog sata'],
hh: ['sat', 'sata', 'sati'],
dd: ['dan', 'dana', 'dana'],
MM: ['mesec', 'meseca', 'meseci'],
yy: ['godina', 'godine', 'godina'],
},
correctGrammaticalCase: function (number, wordKey) {
return number === 1
? wordKey[0]
: number >= 2 && number <= 4
? wordKey[1]
: wordKey[2];
},
translate: function (number, withoutSuffix, key) {
var wordKey = translator.words[key];
if (key.length === 1) {
return withoutSuffix ? wordKey[0] : wordKey[1];
} else {
return (
number +
' ' +
translator.correctGrammaticalCase(number, wordKey)
);
}
},
};
var sr = moment.defineLocale('sr', {
months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
'_'
),
monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
'_'
),
weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'D. M. YYYY.',
LL: 'D. MMMM YYYY.',
LLL: 'D. MMMM YYYY. H:mm',
LLLL: 'dddd, D. MMMM YYYY. H:mm',
},
calendar: {
sameDay: '[danas u] LT',
nextDay: '[sutra u] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[u] [nedelju] [u] LT';
case 3:
return '[u] [sredu] [u] LT';
case 6:
return '[u] [subotu] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[u] dddd [u] LT';
}
},
lastDay: '[juče u] LT',
lastWeek: function () {
var lastWeekDays = [
'[prošle] [nedelje] [u] LT',
'[prošlog] [ponedeljka] [u] LT',
'[prošlog] [utorka] [u] LT',
'[prošle] [srede] [u] LT',
'[prošlog] [četvrtka] [u] LT',
'[prošlog] [petka] [u] LT',
'[prošle] [subote] [u] LT',
];
return lastWeekDays[this.day()];
},
sameElse: 'L',
},
relativeTime: {
future: 'za %s',
past: 'pre %s',
s: 'nekoliko sekundi',
ss: translator.translate,
m: translator.translate,
mm: translator.translate,
h: translator.translate,
hh: translator.translate,
d: 'dan',
dd: translator.translate,
M: 'mesec',
MM: translator.translate,
y: 'godinu',
yy: translator.translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return sr;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ss.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ss.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : siSwati [ss]
//! author : Nicolai Davies : https://github.com/nicolaidavies
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ss = moment.defineLocale('ss', {
months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
'_'
),
monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
'_'
),
weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A',
},
calendar: {
sameDay: '[Namuhla nga] LT',
nextDay: '[Kusasa nga] LT',
nextWeek: 'dddd [nga] LT',
lastDay: '[Itolo nga] LT',
lastWeek: 'dddd [leliphelile] [nga] LT',
sameElse: 'L',
},
relativeTime: {
future: 'nga %s',
past: 'wenteka nga %s',
s: 'emizuzwana lomcane',
ss: '%d mzuzwana',
m: 'umzuzu',
mm: '%d emizuzu',
h: 'lihora',
hh: '%d emahora',
d: 'lilanga',
dd: '%d emalanga',
M: 'inyanga',
MM: '%d tinyanga',
y: 'umnyaka',
yy: '%d iminyaka',
},
meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
meridiem: function (hours, minutes, isLower) {
if (hours < 11) {
return 'ekuseni';
} else if (hours < 15) {
return 'emini';
} else if (hours < 19) {
return 'entsambama';
} else {
return 'ebusuku';
}
},
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'ekuseni') {
return hour;
} else if (meridiem === 'emini') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
if (hour === 0) {
return 0;
}
return hour + 12;
}
},
dayOfMonthOrdinalParse: /\d{1,2}/,
ordinal: '%d',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return ss;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sv.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sv.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Swedish [sv]
//! author : Jens Alm : https://github.com/ulmus
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var sv = moment.defineLocale('sv', {
months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
'_'
),
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY [kl.] HH:mm',
LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
lll: 'D MMM YYYY HH:mm',
llll: 'ddd D MMM YYYY HH:mm',
},
calendar: {
sameDay: '[Idag] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
nextWeek: '[På] dddd LT',
lastWeek: '[I] dddd[s] LT',
sameElse: 'L',
},
relativeTime: {
future: 'om %s',
past: 'för %s sedan',
s: 'några sekunder',
ss: '%d sekunder',
m: 'en minut',
mm: '%d minuter',
h: 'en timme',
hh: '%d timmar',
d: 'en dag',
dd: '%d dagar',
M: 'en månad',
MM: '%d månader',
y: 'ett år',
yy: '%d år',
},
dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? ':e'
: b === 1
? ':a'
: b === 2
? ':a'
: b === 3
? ':e'
: ':e';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return sv;
})));
/***/ }),
/***/ "./node_modules/moment/locale/sw.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/sw.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Swahili [sw]
//! author : Fahad Kassim : https://github.com/fadsel
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var sw = moment.defineLocale('sw', {
months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
'_'
),
monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
'_'
),
weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'hh:mm A',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[leo saa] LT',
nextDay: '[kesho saa] LT',
nextWeek: '[wiki ijayo] dddd [saat] LT',
lastDay: '[jana] LT',
lastWeek: '[wiki iliyopita] dddd [saat] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s baadaye',
past: 'tokea %s',
s: 'hivi punde',
ss: 'sekunde %d',
m: 'dakika moja',
mm: 'dakika %d',
h: 'saa limoja',
hh: 'masaa %d',
d: 'siku moja',
dd: 'siku %d',
M: 'mwezi mmoja',
MM: 'miezi %d',
y: 'mwaka mmoja',
yy: 'miaka %d',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return sw;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ta.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ta.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Tamil [ta]
//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '௧',
2: '௨',
3: '௩',
4: '௪',
5: '௫',
6: '௬',
7: '௭',
8: '௮',
9: '௯',
0: '௦',
},
numberMap = {
'௧': '1',
'௨': '2',
'௩': '3',
'௪': '4',
'௫': '5',
'௬': '6',
'௭': '7',
'௮': '8',
'௯': '9',
'௦': '0',
};
var ta = moment.defineLocale('ta', {
months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
'_'
),
monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
'_'
),
weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
'_'
),
weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
'_'
),
weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, HH:mm',
LLLL: 'dddd, D MMMM YYYY, HH:mm',
},
calendar: {
sameDay: '[இன்று] LT',
nextDay: '[நாளை] LT',
nextWeek: 'dddd, LT',
lastDay: '[நேற்று] LT',
lastWeek: '[கடந்த வாரம்] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s இல்',
past: '%s முன்',
s: 'ஒரு சில விநாடிகள்',
ss: '%d விநாடிகள்',
m: 'ஒரு நிமிடம்',
mm: '%d நிமிடங்கள்',
h: 'ஒரு மணி நேரம்',
hh: '%d மணி நேரம்',
d: 'ஒரு நாள்',
dd: '%d நாட்கள்',
M: 'ஒரு மாதம்',
MM: '%d மாதங்கள்',
y: 'ஒரு வருடம்',
yy: '%d ஆண்டுகள்',
},
dayOfMonthOrdinalParse: /\d{1,2}வது/,
ordinal: function (number) {
return number + 'வது';
},
preparse: function (string) {
return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// refer http://ta.wikipedia.org/s/1er1
meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
meridiem: function (hour, minute, isLower) {
if (hour < 2) {
return ' யாமம்';
} else if (hour < 6) {
return ' வைகறை'; // வைகறை
} else if (hour < 10) {
return ' காலை'; // காலை
} else if (hour < 14) {
return ' நண்பகல்'; // நண்பகல்
} else if (hour < 18) {
return ' எற்பாடு'; // எற்பாடு
} else if (hour < 22) {
return ' மாலை'; // மாலை
} else {
return ' யாமம்';
}
},
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'யாமம்') {
return hour < 2 ? hour : hour + 12;
} else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
return hour;
} else if (meridiem === 'நண்பகல்') {
return hour >= 10 ? hour : hour + 12;
} else {
return hour + 12;
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return ta;
})));
/***/ }),
/***/ "./node_modules/moment/locale/te.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/te.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Telugu [te]
//! author : Krishna Chaitanya Thota : https://github.com/kcthota
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var te = moment.defineLocale('te', {
months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
'_'
),
monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
'_'
),
weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
longDateFormat: {
LT: 'A h:mm',
LTS: 'A h:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm',
LLLL: 'dddd, D MMMM YYYY, A h:mm',
},
calendar: {
sameDay: '[నేడు] LT',
nextDay: '[రేపు] LT',
nextWeek: 'dddd, LT',
lastDay: '[నిన్న] LT',
lastWeek: '[గత] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s లో',
past: '%s క్రితం',
s: 'కొన్ని క్షణాలు',
ss: '%d సెకన్లు',
m: 'ఒక నిమిషం',
mm: '%d నిమిషాలు',
h: 'ఒక గంట',
hh: '%d గంటలు',
d: 'ఒక రోజు',
dd: '%d రోజులు',
M: 'ఒక నెల',
MM: '%d నెలలు',
y: 'ఒక సంవత్సరం',
yy: '%d సంవత్సరాలు',
},
dayOfMonthOrdinalParse: /\d{1,2}వ/,
ordinal: '%dవ',
meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'రాత్రి') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'ఉదయం') {
return hour;
} else if (meridiem === 'మధ్యాహ్నం') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'సాయంత్రం') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'రాత్రి';
} else if (hour < 10) {
return 'ఉదయం';
} else if (hour < 17) {
return 'మధ్యాహ్నం';
} else if (hour < 20) {
return 'సాయంత్రం';
} else {
return 'రాత్రి';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return te;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tet.js":
/*!*******************************************!*\
!*** ./node_modules/moment/locale/tet.js ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Tetun Dili (East Timor) [tet]
//! author : Joshua Brooks : https://github.com/joshbrooks
//! author : Onorio De J. Afonso : https://github.com/marobo
//! author : Sonia Simoes : https://github.com/soniasimoes
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var tet = moment.defineLocale('tet', {
months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
'_'
),
monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Ohin iha] LT',
nextDay: '[Aban iha] LT',
nextWeek: 'dddd [iha] LT',
lastDay: '[Horiseik iha] LT',
lastWeek: 'dddd [semana kotuk] [iha] LT',
sameElse: 'L',
},
relativeTime: {
future: 'iha %s',
past: '%s liuba',
s: 'segundu balun',
ss: 'segundu %d',
m: 'minutu ida',
mm: 'minutu %d',
h: 'oras ida',
hh: 'oras %d',
d: 'loron ida',
dd: 'loron %d',
M: 'fulan ida',
MM: 'fulan %d',
y: 'tinan ida',
yy: 'tinan %d',
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return tet;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tg.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/tg.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Tajik [tg]
//! author : Orif N. Jr. : https://github.com/orif-jr
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var suffixes = {
0: '-ум',
1: '-ум',
2: '-юм',
3: '-юм',
4: '-ум',
5: '-ум',
6: '-ум',
7: '-ум',
8: '-ум',
9: '-ум',
10: '-ум',
12: '-ум',
13: '-ум',
20: '-ум',
30: '-юм',
40: '-ум',
50: '-ум',
60: '-ум',
70: '-ум',
80: '-ум',
90: '-ум',
100: '-ум',
};
var tg = moment.defineLocale('tg', {
months: {
format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
'_'
),
standalone: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
'_'
),
},
monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
'_'
),
weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[Имрӯз соати] LT',
nextDay: '[Фардо соати] LT',
lastDay: '[Дирӯз соати] LT',
nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
sameElse: 'L',
},
relativeTime: {
future: 'баъди %s',
past: '%s пеш',
s: 'якчанд сония',
m: 'як дақиқа',
mm: '%d дақиқа',
h: 'як соат',
hh: '%d соат',
d: 'як рӯз',
dd: '%d рӯз',
M: 'як моҳ',
MM: '%d моҳ',
y: 'як сол',
yy: '%d сол',
},
meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'шаб') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'субҳ') {
return hour;
} else if (meridiem === 'рӯз') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'бегоҳ') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'шаб';
} else if (hour < 11) {
return 'субҳ';
} else if (hour < 16) {
return 'рӯз';
} else if (hour < 19) {
return 'бегоҳ';
} else {
return 'шаб';
}
},
dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
ordinal: function (number) {
var a = number % 10,
b = number >= 100 ? 100 : null;
return number + (suffixes[number] || suffixes[a] || suffixes[b]);
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1th is the first week of the year.
},
});
return tg;
})));
/***/ }),
/***/ "./node_modules/moment/locale/th.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/th.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Thai [th]
//! author : Kridsada Thanabulpong : https://github.com/sirn
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var th = moment.defineLocale('th', {
months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
'_'
),
monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY เวลา H:mm',
LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
},
meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
isPM: function (input) {
return input === 'หลังเที่ยง';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ก่อนเที่ยง';
} else {
return 'หลังเที่ยง';
}
},
calendar: {
sameDay: '[วันนี้ เวลา] LT',
nextDay: '[พรุ่งนี้ เวลา] LT',
nextWeek: 'dddd[หน้า เวลา] LT',
lastDay: '[เมื่อวานนี้ เวลา] LT',
lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
sameElse: 'L',
},
relativeTime: {
future: 'อีก %s',
past: '%sที่แล้ว',
s: 'ไม่กี่วินาที',
ss: '%d วินาที',
m: '1 นาที',
mm: '%d นาที',
h: '1 ชั่วโมง',
hh: '%d ชั่วโมง',
d: '1 วัน',
dd: '%d วัน',
w: '1 สัปดาห์',
ww: '%d สัปดาห์',
M: '1 เดือน',
MM: '%d เดือน',
y: '1 ปี',
yy: '%d ปี',
},
});
return th;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tk.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/tk.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Turkmen [tk]
//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var suffixes = {
1: "'inji",
5: "'inji",
8: "'inji",
70: "'inji",
80: "'inji",
2: "'nji",
7: "'nji",
20: "'nji",
50: "'nji",
3: "'ünji",
4: "'ünji",
100: "'ünji",
6: "'njy",
9: "'unjy",
10: "'unjy",
30: "'unjy",
60: "'ynjy",
90: "'ynjy",
};
var tk = moment.defineLocale('tk', {
months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
'_'
),
monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
'_'
),
weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[bugün sagat] LT',
nextDay: '[ertir sagat] LT',
nextWeek: '[indiki] dddd [sagat] LT',
lastDay: '[düýn] LT',
lastWeek: '[geçen] dddd [sagat] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s soň',
past: '%s öň',
s: 'birnäçe sekunt',
m: 'bir minut',
mm: '%d minut',
h: 'bir sagat',
hh: '%d sagat',
d: 'bir gün',
dd: '%d gün',
M: 'bir aý',
MM: '%d aý',
y: 'bir ýyl',
yy: '%d ýyl',
},
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'Do':
case 'DD':
return number;
default:
if (number === 0) {
// special case for zero
return number + "'unjy";
}
var a = number % 10,
b = (number % 100) - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return tk;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tl-ph.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/tl-ph.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Tagalog (Philippines) [tl-ph]
//! author : Dan Hagman : https://github.com/hagmandan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var tlPh = moment.defineLocale('tl-ph', {
months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
'_'
),
monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
'_'
),
weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'MM/D/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY HH:mm',
LLLL: 'dddd, MMMM DD, YYYY HH:mm',
},
calendar: {
sameDay: 'LT [ngayong araw]',
nextDay: '[Bukas ng] LT',
nextWeek: 'LT [sa susunod na] dddd',
lastDay: 'LT [kahapon]',
lastWeek: 'LT [noong nakaraang] dddd',
sameElse: 'L',
},
relativeTime: {
future: 'sa loob ng %s',
past: '%s ang nakalipas',
s: 'ilang segundo',
ss: '%d segundo',
m: 'isang minuto',
mm: '%d minuto',
h: 'isang oras',
hh: '%d oras',
d: 'isang araw',
dd: '%d araw',
M: 'isang buwan',
MM: '%d buwan',
y: 'isang taon',
yy: '%d taon',
},
dayOfMonthOrdinalParse: /\d{1,2}/,
ordinal: function (number) {
return number;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return tlPh;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tlh.js":
/*!*******************************************!*\
!*** ./node_modules/moment/locale/tlh.js ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Klingon [tlh]
//! author : Dominika Kruk : https://github.com/amaranthrose
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
function translateFuture(output) {
var time = output;
time =
output.indexOf('jaj') !== -1
? time.slice(0, -3) + 'leS'
: output.indexOf('jar') !== -1
? time.slice(0, -3) + 'waQ'
: output.indexOf('DIS') !== -1
? time.slice(0, -3) + 'nem'
: time + ' pIq';
return time;
}
function translatePast(output) {
var time = output;
time =
output.indexOf('jaj') !== -1
? time.slice(0, -3) + 'Hu’'
: output.indexOf('jar') !== -1
? time.slice(0, -3) + 'wen'
: output.indexOf('DIS') !== -1
? time.slice(0, -3) + 'ben'
: time + ' ret';
return time;
}
function translate(number, withoutSuffix, string, isFuture) {
var numberNoun = numberAsNoun(number);
switch (string) {
case 'ss':
return numberNoun + ' lup';
case 'mm':
return numberNoun + ' tup';
case 'hh':
return numberNoun + ' rep';
case 'dd':
return numberNoun + ' jaj';
case 'MM':
return numberNoun + ' jar';
case 'yy':
return numberNoun + ' DIS';
}
}
function numberAsNoun(number) {
var hundred = Math.floor((number % 1000) / 100),
ten = Math.floor((number % 100) / 10),
one = number % 10,
word = '';
if (hundred > 0) {
word += numbersNouns[hundred] + 'vatlh';
}
if (ten > 0) {
word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
}
if (one > 0) {
word += (word !== '' ? ' ' : '') + numbersNouns[one];
}
return word === '' ? 'pagh' : word;
}
var tlh = moment.defineLocale('tlh', {
months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
'_'
),
monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
'_'
),
monthsParseExact: true,
weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
'_'
),
weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
'_'
),
weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
'_'
),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[DaHjaj] LT',
nextDay: '[wa’leS] LT',
nextWeek: 'LLL',
lastDay: '[wa’Hu’] LT',
lastWeek: 'LLL',
sameElse: 'L',
},
relativeTime: {
future: translateFuture,
past: translatePast,
s: 'puS lup',
ss: translate,
m: 'wa’ tup',
mm: translate,
h: 'wa’ rep',
hh: translate,
d: 'wa’ jaj',
dd: translate,
M: 'wa’ jar',
MM: translate,
y: 'wa’ DIS',
yy: translate,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return tlh;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tr.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/tr.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Turkish [tr]
//! authors : Erhan Gundogan : https://github.com/erhangundogan,
//! Burak Yiğit Kaya: https://github.com/BYK
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var suffixes = {
1: "'inci",
5: "'inci",
8: "'inci",
70: "'inci",
80: "'inci",
2: "'nci",
7: "'nci",
20: "'nci",
50: "'nci",
3: "'üncü",
4: "'üncü",
100: "'üncü",
6: "'ncı",
9: "'uncu",
10: "'uncu",
30: "'uncu",
60: "'ıncı",
90: "'ıncı",
};
var tr = moment.defineLocale('tr', {
months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
'_'
),
monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
'_'
),
weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
meridiem: function (hours, minutes, isLower) {
if (hours < 12) {
return isLower ? 'öö' : 'ÖÖ';
} else {
return isLower ? 'ös' : 'ÖS';
}
},
meridiemParse: /öö|ÖÖ|ös|ÖS/,
isPM: function (input) {
return input === 'ös' || input === 'ÖS';
},
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[bugün saat] LT',
nextDay: '[yarın saat] LT',
nextWeek: '[gelecek] dddd [saat] LT',
lastDay: '[dün] LT',
lastWeek: '[geçen] dddd [saat] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s sonra',
past: '%s önce',
s: 'birkaç saniye',
ss: '%d saniye',
m: 'bir dakika',
mm: '%d dakika',
h: 'bir saat',
hh: '%d saat',
d: 'bir gün',
dd: '%d gün',
w: 'bir hafta',
ww: '%d hafta',
M: 'bir ay',
MM: '%d ay',
y: 'bir yıl',
yy: '%d yıl',
},
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'Do':
case 'DD':
return number;
default:
if (number === 0) {
// special case for zero
return number + "'ıncı";
}
var a = number % 10,
b = (number % 100) - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return tr;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tzl.js":
/*!*******************************************!*\
!*** ./node_modules/moment/locale/tzl.js ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Talossan [tzl]
//! author : Robin van der Vliet : https://github.com/robin0van0der0v
//! author : Iustì Canun
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
// This is currently too difficult (maybe even impossible) to add.
var tzl = moment.defineLocale('tzl', {
months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
'_'
),
monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM [dallas] YYYY',
LLL: 'D. MMMM [dallas] YYYY HH.mm',
LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
},
meridiemParse: /d\'o|d\'a/i,
isPM: function (input) {
return "d'o" === input.toLowerCase();
},
meridiem: function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? "d'o" : "D'O";
} else {
return isLower ? "d'a" : "D'A";
}
},
calendar: {
sameDay: '[oxhi à] LT',
nextDay: '[demà à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[ieiri à] LT',
lastWeek: '[sür el] dddd [lasteu à] LT',
sameElse: 'L',
},
relativeTime: {
future: 'osprei %s',
past: 'ja%s',
s: processRelativeTime,
ss: processRelativeTime,
m: processRelativeTime,
mm: processRelativeTime,
h: processRelativeTime,
hh: processRelativeTime,
d: processRelativeTime,
dd: processRelativeTime,
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime,
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
s: ['viensas secunds', "'iensas secunds"],
ss: [number + ' secunds', '' + number + ' secunds'],
m: ["'n míut", "'iens míut"],
mm: [number + ' míuts', '' + number + ' míuts'],
h: ["'n þora", "'iensa þora"],
hh: [number + ' þoras', '' + number + ' þoras'],
d: ["'n ziua", "'iensa ziua"],
dd: [number + ' ziuas', '' + number + ' ziuas'],
M: ["'n mes", "'iens mes"],
MM: [number + ' mesen', '' + number + ' mesen'],
y: ["'n ar", "'iens ar"],
yy: [number + ' ars', '' + number + ' ars'],
};
return isFuture
? format[key][0]
: withoutSuffix
? format[key][0]
: format[key][1];
}
return tzl;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tzm-latn.js":
/*!************************************************!*\
!*** ./node_modules/moment/locale/tzm-latn.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Central Atlas Tamazight Latin [tzm-latn]
//! author : Abdel Said : https://github.com/abdelsaid
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var tzmLatn = moment.defineLocale('tzm-latn', {
months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
'_'
),
monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
'_'
),
weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[asdkh g] LT',
nextDay: '[aska g] LT',
nextWeek: 'dddd [g] LT',
lastDay: '[assant g] LT',
lastWeek: 'dddd [g] LT',
sameElse: 'L',
},
relativeTime: {
future: 'dadkh s yan %s',
past: 'yan %s',
s: 'imik',
ss: '%d imik',
m: 'minuḍ',
mm: '%d minuḍ',
h: 'saɛa',
hh: '%d tassaɛin',
d: 'ass',
dd: '%d ossan',
M: 'ayowr',
MM: '%d iyyirn',
y: 'asgas',
yy: '%d isgasn',
},
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return tzmLatn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/tzm.js":
/*!*******************************************!*\
!*** ./node_modules/moment/locale/tzm.js ***!
\*******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Central Atlas Tamazight [tzm]
//! author : Abdel Said : https://github.com/abdelsaid
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var tzm = moment.defineLocale('tzm', {
months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
'_'
),
monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
'_'
),
weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
nextWeek: 'dddd [ⴴ] LT',
lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
lastWeek: 'dddd [ⴴ] LT',
sameElse: 'L',
},
relativeTime: {
future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
past: 'ⵢⴰⵏ %s',
s: 'ⵉⵎⵉⴽ',
ss: '%d ⵉⵎⵉⴽ',
m: 'ⵎⵉⵏⵓⴺ',
mm: '%d ⵎⵉⵏⵓⴺ',
h: 'ⵙⴰⵄⴰ',
hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
d: 'ⴰⵙⵙ',
dd: '%d oⵙⵙⴰⵏ',
M: 'ⴰⵢoⵓⵔ',
MM: '%d ⵉⵢⵢⵉⵔⵏ',
y: 'ⴰⵙⴳⴰⵙ',
yy: '%d ⵉⵙⴳⴰⵙⵏ',
},
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 12th is the first week of the year.
},
});
return tzm;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ug-cn.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/ug-cn.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Uyghur (China) [ug-cn]
//! author: boyaq : https://github.com/boyaq
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var ugCn = moment.defineLocale('ug-cn', {
months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
'_'
),
monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
'_'
),
weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
'_'
),
weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY-MM-DD',
LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
},
meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (
meridiem === 'يېرىم كېچە' ||
meridiem === 'سەھەر' ||
meridiem === 'چۈشتىن بۇرۇن'
) {
return hour;
} else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
return hour + 12;
} else {
return hour >= 11 ? hour : hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return 'يېرىم كېچە';
} else if (hm < 900) {
return 'سەھەر';
} else if (hm < 1130) {
return 'چۈشتىن بۇرۇن';
} else if (hm < 1230) {
return 'چۈش';
} else if (hm < 1800) {
return 'چۈشتىن كېيىن';
} else {
return 'كەچ';
}
},
calendar: {
sameDay: '[بۈگۈن سائەت] LT',
nextDay: '[ئەتە سائەت] LT',
nextWeek: '[كېلەركى] dddd [سائەت] LT',
lastDay: '[تۆنۈگۈن] LT',
lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s كېيىن',
past: '%s بۇرۇن',
s: 'نەچچە سېكونت',
ss: '%d سېكونت',
m: 'بىر مىنۇت',
mm: '%d مىنۇت',
h: 'بىر سائەت',
hh: '%d سائەت',
d: 'بىر كۈن',
dd: '%d كۈن',
M: 'بىر ئاي',
MM: '%d ئاي',
y: 'بىر يىل',
yy: '%d يىل',
},
dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '-كۈنى';
case 'w':
case 'W':
return number + '-ھەپتە';
default:
return number;
}
},
preparse: function (string) {
return string.replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/,/g, '،');
},
week: {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
});
return ugCn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/uk.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/uk.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Ukrainian [uk]
//! author : zemlanin : https://github.com/zemlanin
//! Author : Menelion Elensúle : https://github.com/Oire
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11
? forms[0]
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
? forms[1]
: forms[2];
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
dd: 'день_дні_днів',
MM: 'місяць_місяці_місяців',
yy: 'рік_роки_років',
};
if (key === 'm') {
return withoutSuffix ? 'хвилина' : 'хвилину';
} else if (key === 'h') {
return withoutSuffix ? 'година' : 'годину';
} else {
return number + ' ' + plural(format[key], +number);
}
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
'_'
),
accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
'_'
),
genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
'_'
),
},
nounCase;
if (m === true) {
return weekdays['nominative']
.slice(1, 7)
.concat(weekdays['nominative'].slice(0, 1));
}
if (!m) {
return weekdays['nominative'];
}
nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
? 'accusative'
: /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
? 'genitive'
: 'nominative';
return weekdays[nounCase][m.day()];
}
function processHoursFunction(str) {
return function () {
return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
};
}
var uk = moment.defineLocale('uk', {
months: {
format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
'_'
),
standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
'_'
),
},
monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
'_'
),
weekdays: weekdaysCaseReplace,
weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY р.',
LLL: 'D MMMM YYYY р., HH:mm',
LLLL: 'dddd, D MMMM YYYY р., HH:mm',
},
calendar: {
sameDay: processHoursFunction('[Сьогодні '),
nextDay: processHoursFunction('[Завтра '),
lastDay: processHoursFunction('[Вчора '),
nextWeek: processHoursFunction('[У] dddd ['),
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 5:
case 6:
return processHoursFunction('[Минулої] dddd [').call(this);
case 1:
case 2:
case 4:
return processHoursFunction('[Минулого] dddd [').call(this);
}
},
sameElse: 'L',
},
relativeTime: {
future: 'за %s',
past: '%s тому',
s: 'декілька секунд',
ss: relativeTimeWithPlural,
m: relativeTimeWithPlural,
mm: relativeTimeWithPlural,
h: 'годину',
hh: relativeTimeWithPlural,
d: 'день',
dd: relativeTimeWithPlural,
M: 'місяць',
MM: relativeTimeWithPlural,
y: 'рік',
yy: relativeTimeWithPlural,
},
// M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
meridiemParse: /ночі|ранку|дня|вечора/,
isPM: function (input) {
return /^(дня|вечора)$/.test(input);
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'ночі';
} else if (hour < 12) {
return 'ранку';
} else if (hour < 17) {
return 'дня';
} else {
return 'вечора';
}
},
dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
ordinal: function (number, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
case 'w':
case 'W':
return number + '-й';
case 'D':
return number + '-го';
default:
return number;
}
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return uk;
})));
/***/ }),
/***/ "./node_modules/moment/locale/ur.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/ur.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Urdu [ur]
//! author : Sawood Alam : https://github.com/ibnesayeed
//! author : Zack : https://github.com/ZackVision
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var months = [
'جنوری',
'فروری',
'مارچ',
'اپریل',
'مئی',
'جون',
'جولائی',
'اگست',
'ستمبر',
'اکتوبر',
'نومبر',
'دسمبر',
],
days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
var ur = moment.defineLocale('ur', {
months: months,
monthsShort: months,
weekdays: days,
weekdaysShort: days,
weekdaysMin: days,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd، D MMMM YYYY HH:mm',
},
meridiemParse: /صبح|شام/,
isPM: function (input) {
return 'شام' === input;
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'صبح';
}
return 'شام';
},
calendar: {
sameDay: '[آج بوقت] LT',
nextDay: '[کل بوقت] LT',
nextWeek: 'dddd [بوقت] LT',
lastDay: '[گذشتہ روز بوقت] LT',
lastWeek: '[گذشتہ] dddd [بوقت] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s بعد',
past: '%s قبل',
s: 'چند سیکنڈ',
ss: '%d سیکنڈ',
m: 'ایک منٹ',
mm: '%d منٹ',
h: 'ایک گھنٹہ',
hh: '%d گھنٹے',
d: 'ایک دن',
dd: '%d دن',
M: 'ایک ماہ',
MM: '%d ماہ',
y: 'ایک سال',
yy: '%d سال',
},
preparse: function (string) {
return string.replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/,/g, '،');
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return ur;
})));
/***/ }),
/***/ "./node_modules/moment/locale/uz-latn.js":
/*!***********************************************!*\
!*** ./node_modules/moment/locale/uz-latn.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Uzbek Latin [uz-latn]
//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var uzLatn = moment.defineLocale('uz-latn', {
months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
'_'
),
monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
'_'
),
weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'D MMMM YYYY, dddd HH:mm',
},
calendar: {
sameDay: '[Bugun soat] LT [da]',
nextDay: '[Ertaga] LT [da]',
nextWeek: 'dddd [kuni soat] LT [da]',
lastDay: '[Kecha soat] LT [da]',
lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
sameElse: 'L',
},
relativeTime: {
future: 'Yaqin %s ichida',
past: 'Bir necha %s oldin',
s: 'soniya',
ss: '%d soniya',
m: 'bir daqiqa',
mm: '%d daqiqa',
h: 'bir soat',
hh: '%d soat',
d: 'bir kun',
dd: '%d kun',
M: 'bir oy',
MM: '%d oy',
y: 'bir yil',
yy: '%d yil',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 7th is the first week of the year.
},
});
return uzLatn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/uz.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/uz.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Uzbek [uz]
//! author : Sardor Muminov : https://github.com/muminoff
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var uz = moment.defineLocale('uz', {
months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
'_'
),
monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'D MMMM YYYY, dddd HH:mm',
},
calendar: {
sameDay: '[Бугун соат] LT [да]',
nextDay: '[Эртага] LT [да]',
nextWeek: 'dddd [куни соат] LT [да]',
lastDay: '[Кеча соат] LT [да]',
lastWeek: '[Утган] dddd [куни соат] LT [да]',
sameElse: 'L',
},
relativeTime: {
future: 'Якин %s ичида',
past: 'Бир неча %s олдин',
s: 'фурсат',
ss: '%d фурсат',
m: 'бир дакика',
mm: '%d дакика',
h: 'бир соат',
hh: '%d соат',
d: 'бир кун',
dd: '%d кун',
M: 'бир ой',
MM: '%d ой',
y: 'бир йил',
yy: '%d йил',
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 4th is the first week of the year.
},
});
return uz;
})));
/***/ }),
/***/ "./node_modules/moment/locale/vi.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/vi.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Vietnamese [vi]
//! author : Bang Nguyen : https://github.com/bangnk
//! author : Chien Kira : https://github.com/chienkira
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var vi = moment.defineLocale('vi', {
months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
'_'
),
monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
'_'
),
monthsParseExact: true,
weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
'_'
),
weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
weekdaysParseExact: true,
meridiemParse: /sa|ch/i,
isPM: function (input) {
return /^ch$/i.test(input);
},
meridiem: function (hours, minutes, isLower) {
if (hours < 12) {
return isLower ? 'sa' : 'SA';
} else {
return isLower ? 'ch' : 'CH';
}
},
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM [năm] YYYY',
LLL: 'D MMMM [năm] YYYY HH:mm',
LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
l: 'DD/M/YYYY',
ll: 'D MMM YYYY',
lll: 'D MMM YYYY HH:mm',
llll: 'ddd, D MMM YYYY HH:mm',
},
calendar: {
sameDay: '[Hôm nay lúc] LT',
nextDay: '[Ngày mai lúc] LT',
nextWeek: 'dddd [tuần tới lúc] LT',
lastDay: '[Hôm qua lúc] LT',
lastWeek: 'dddd [tuần trước lúc] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s tới',
past: '%s trước',
s: 'vài giây',
ss: '%d giây',
m: 'một phút',
mm: '%d phút',
h: 'một giờ',
hh: '%d giờ',
d: 'một ngày',
dd: '%d ngày',
w: 'một tuần',
ww: '%d tuần',
M: 'một tháng',
MM: '%d tháng',
y: 'một năm',
yy: '%d năm',
},
dayOfMonthOrdinalParse: /\d{1,2}/,
ordinal: function (number) {
return number;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return vi;
})));
/***/ }),
/***/ "./node_modules/moment/locale/x-pseudo.js":
/*!************************************************!*\
!*** ./node_modules/moment/locale/x-pseudo.js ***!
\************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Pseudo [x-pseudo]
//! author : Andrew Hood : https://github.com/andrewhood125
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var xPseudo = moment.defineLocale('x-pseudo', {
months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
'_'
),
monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
'_'
),
monthsParseExact: true,
weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
'_'
),
weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[T~ódá~ý át] LT',
nextDay: '[T~ómó~rró~w át] LT',
nextWeek: 'dddd [át] LT',
lastDay: '[Ý~ést~érdá~ý át] LT',
lastWeek: '[L~ást] dddd [át] LT',
sameElse: 'L',
},
relativeTime: {
future: 'í~ñ %s',
past: '%s á~gó',
s: 'á ~féw ~sécó~ñds',
ss: '%d s~écóñ~ds',
m: 'á ~míñ~úté',
mm: '%d m~íñú~tés',
h: 'á~ñ hó~úr',
hh: '%d h~óúrs',
d: 'á ~dáý',
dd: '%d d~áýs',
M: 'á ~móñ~th',
MM: '%d m~óñt~hs',
y: 'á ~ýéár',
yy: '%d ý~éárs',
},
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function (number) {
var b = number % 10,
output =
~~((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return xPseudo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/yo.js":
/*!******************************************!*\
!*** ./node_modules/moment/locale/yo.js ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Yoruba Nigeria [yo]
//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var yo = moment.defineLocale('yo', {
months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
'_'
),
monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
longDateFormat: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A',
},
calendar: {
sameDay: '[Ònì ni] LT',
nextDay: '[Ọ̀la ni] LT',
nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
lastDay: '[Àna ni] LT',
lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
sameElse: 'L',
},
relativeTime: {
future: 'ní %s',
past: '%s kọjá',
s: 'ìsẹjú aayá die',
ss: 'aayá %d',
m: 'ìsẹjú kan',
mm: 'ìsẹjú %d',
h: 'wákati kan',
hh: 'wákati %d',
d: 'ọjọ́ kan',
dd: 'ọjọ́ %d',
M: 'osù kan',
MM: 'osù %d',
y: 'ọdún kan',
yy: 'ọdún %d',
},
dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
ordinal: 'ọjọ́ %d',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return yo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/zh-cn.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/zh-cn.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Chinese (China) [zh-cn]
//! author : suupic : https://github.com/suupic
//! author : Zeno Zeng : https://github.com/zenozeng
//! author : uu109 : https://github.com/uu109
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var zhCn = moment.defineLocale('zh-cn', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
'_'
),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
'_'
),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日Ah点mm分',
LLLL: 'YYYY年M月D日ddddAh点mm分',
l: 'YYYY/M/D',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日dddd HH:mm',
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
return hour;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
} else {
// '中午'
return hour >= 11 ? hour : hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1130) {
return '上午';
} else if (hm < 1230) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar: {
sameDay: '[今天]LT',
nextDay: '[明天]LT',
nextWeek: function (now) {
if (now.week() !== this.week()) {
return '[下]dddLT';
} else {
return '[本]dddLT';
}
},
lastDay: '[昨天]LT',
lastWeek: function (now) {
if (this.week() !== now.week()) {
return '[上]dddLT';
} else {
return '[本]dddLT';
}
},
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
case 'M':
return number + '月';
case 'w':
case 'W':
return number + '周';
default:
return number;
}
},
relativeTime: {
future: '%s后',
past: '%s前',
s: '几秒',
ss: '%d 秒',
m: '1 分钟',
mm: '%d 分钟',
h: '1 小时',
hh: '%d 小时',
d: '1 天',
dd: '%d 天',
w: '1 周',
ww: '%d 周',
M: '1 个月',
MM: '%d 个月',
y: '1 年',
yy: '%d 年',
},
week: {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return zhCn;
})));
/***/ }),
/***/ "./node_modules/moment/locale/zh-hk.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/zh-hk.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Chinese (Hong Kong) [zh-hk]
//! author : Ben : https://github.com/ben-lin
//! author : Chris Lam : https://github.com/hehachris
//! author : Konstantin : https://github.com/skfd
//! author : Anthony : https://github.com/anthonylau
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var zhHk = moment.defineLocale('zh-hk', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
'_'
),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
'_'
),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日 HH:mm',
LLLL: 'YYYY年M月D日dddd HH:mm',
l: 'YYYY/M/D',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日dddd HH:mm',
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
return hour;
} else if (meridiem === '中午') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1200) {
return '上午';
} else if (hm === 1200) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar: {
sameDay: '[今天]LT',
nextDay: '[明天]LT',
nextWeek: '[下]ddddLT',
lastDay: '[昨天]LT',
lastWeek: '[上]ddddLT',
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
case 'M':
return number + '月';
case 'w':
case 'W':
return number + '週';
default:
return number;
}
},
relativeTime: {
future: '%s後',
past: '%s前',
s: '幾秒',
ss: '%d 秒',
m: '1 分鐘',
mm: '%d 分鐘',
h: '1 小時',
hh: '%d 小時',
d: '1 天',
dd: '%d 天',
M: '1 個月',
MM: '%d 個月',
y: '1 年',
yy: '%d 年',
},
});
return zhHk;
})));
/***/ }),
/***/ "./node_modules/moment/locale/zh-mo.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/zh-mo.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Chinese (Macau) [zh-mo]
//! author : Ben : https://github.com/ben-lin
//! author : Chris Lam : https://github.com/hehachris
//! author : Tan Yuanhong : https://github.com/le0tan
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var zhMo = moment.defineLocale('zh-mo', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
'_'
),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
'_'
),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日 HH:mm',
LLLL: 'YYYY年M月D日dddd HH:mm',
l: 'D/M/YYYY',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日dddd HH:mm',
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
return hour;
} else if (meridiem === '中午') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1130) {
return '上午';
} else if (hm < 1230) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar: {
sameDay: '[今天] LT',
nextDay: '[明天] LT',
nextWeek: '[下]dddd LT',
lastDay: '[昨天] LT',
lastWeek: '[上]dddd LT',
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
case 'M':
return number + '月';
case 'w':
case 'W':
return number + '週';
default:
return number;
}
},
relativeTime: {
future: '%s內',
past: '%s前',
s: '幾秒',
ss: '%d 秒',
m: '1 分鐘',
mm: '%d 分鐘',
h: '1 小時',
hh: '%d 小時',
d: '1 天',
dd: '%d 天',
M: '1 個月',
MM: '%d 個月',
y: '1 年',
yy: '%d 年',
},
});
return zhMo;
})));
/***/ }),
/***/ "./node_modules/moment/locale/zh-tw.js":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/zh-tw.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Chinese (Taiwan) [zh-tw]
//! author : Ben : https://github.com/ben-lin
//! author : Chris Lam : https://github.com/hehachris
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
0
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var zhTw = moment.defineLocale('zh-tw', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
'_'
),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
'_'
),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日 HH:mm',
LLLL: 'YYYY年M月D日dddd HH:mm',
l: 'YYYY/M/D',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日dddd HH:mm',
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
return hour;
} else if (meridiem === '中午') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1130) {
return '上午';
} else if (hm < 1230) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar: {
sameDay: '[今天] LT',
nextDay: '[明天] LT',
nextWeek: '[下]dddd LT',
lastDay: '[昨天] LT',
lastWeek: '[上]dddd LT',
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
case 'M':
return number + '月';
case 'w':
case 'W':
return number + '週';
default:
return number;
}
},
relativeTime: {
future: '%s後',
past: '%s前',
s: '幾秒',
ss: '%d 秒',
m: '1 分鐘',
mm: '%d 分鐘',
h: '1 小時',
hh: '%d 小時',
d: '1 天',
dd: '%d 天',
M: '1 個月',
MM: '%d 個月',
y: '1 年',
yy: '%d 年',
},
});
return zhTw;
})));
/***/ }),
/***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$":
/*!***************************************************!*\
!*** ./node_modules/moment/locale/ sync ^\.\/.*$ ***!
\***************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var map = {
"./af": "./node_modules/moment/locale/af.js",
"./af.js": "./node_modules/moment/locale/af.js",
"./ar": "./node_modules/moment/locale/ar.js",
"./ar-dz": "./node_modules/moment/locale/ar-dz.js",
"./ar-dz.js": "./node_modules/moment/locale/ar-dz.js",
"./ar-kw": "./node_modules/moment/locale/ar-kw.js",
"./ar-kw.js": "./node_modules/moment/locale/ar-kw.js",
"./ar-ly": "./node_modules/moment/locale/ar-ly.js",
"./ar-ly.js": "./node_modules/moment/locale/ar-ly.js",
"./ar-ma": "./node_modules/moment/locale/ar-ma.js",
"./ar-ma.js": "./node_modules/moment/locale/ar-ma.js",
"./ar-sa": "./node_modules/moment/locale/ar-sa.js",
"./ar-sa.js": "./node_modules/moment/locale/ar-sa.js",
"./ar-tn": "./node_modules/moment/locale/ar-tn.js",
"./ar-tn.js": "./node_modules/moment/locale/ar-tn.js",
"./ar.js": "./node_modules/moment/locale/ar.js",
"./az": "./node_modules/moment/locale/az.js",
"./az.js": "./node_modules/moment/locale/az.js",
"./be": "./node_modules/moment/locale/be.js",
"./be.js": "./node_modules/moment/locale/be.js",
"./bg": "./node_modules/moment/locale/bg.js",
"./bg.js": "./node_modules/moment/locale/bg.js",
"./bm": "./node_modules/moment/locale/bm.js",
"./bm.js": "./node_modules/moment/locale/bm.js",
"./bn": "./node_modules/moment/locale/bn.js",
"./bn-bd": "./node_modules/moment/locale/bn-bd.js",
"./bn-bd.js": "./node_modules/moment/locale/bn-bd.js",
"./bn.js": "./node_modules/moment/locale/bn.js",
"./bo": "./node_modules/moment/locale/bo.js",
"./bo.js": "./node_modules/moment/locale/bo.js",
"./br": "./node_modules/moment/locale/br.js",
"./br.js": "./node_modules/moment/locale/br.js",
"./bs": "./node_modules/moment/locale/bs.js",
"./bs.js": "./node_modules/moment/locale/bs.js",
"./ca": "./node_modules/moment/locale/ca.js",
"./ca.js": "./node_modules/moment/locale/ca.js",
"./cs": "./node_modules/moment/locale/cs.js",
"./cs.js": "./node_modules/moment/locale/cs.js",
"./cv": "./node_modules/moment/locale/cv.js",
"./cv.js": "./node_modules/moment/locale/cv.js",
"./cy": "./node_modules/moment/locale/cy.js",
"./cy.js": "./node_modules/moment/locale/cy.js",
"./da": "./node_modules/moment/locale/da.js",
"./da.js": "./node_modules/moment/locale/da.js",
"./de": "./node_modules/moment/locale/de.js",
"./de-at": "./node_modules/moment/locale/de-at.js",
"./de-at.js": "./node_modules/moment/locale/de-at.js",
"./de-ch": "./node_modules/moment/locale/de-ch.js",
"./de-ch.js": "./node_modules/moment/locale/de-ch.js",
"./de.js": "./node_modules/moment/locale/de.js",
"./dv": "./node_modules/moment/locale/dv.js",
"./dv.js": "./node_modules/moment/locale/dv.js",
"./el": "./node_modules/moment/locale/el.js",
"./el.js": "./node_modules/moment/locale/el.js",
"./en-au": "./node_modules/moment/locale/en-au.js",
"./en-au.js": "./node_modules/moment/locale/en-au.js",
"./en-ca": "./node_modules/moment/locale/en-ca.js",
"./en-ca.js": "./node_modules/moment/locale/en-ca.js",
"./en-gb": "./node_modules/moment/locale/en-gb.js",
"./en-gb.js": "./node_modules/moment/locale/en-gb.js",
"./en-ie": "./node_modules/moment/locale/en-ie.js",
"./en-ie.js": "./node_modules/moment/locale/en-ie.js",
"./en-il": "./node_modules/moment/locale/en-il.js",
"./en-il.js": "./node_modules/moment/locale/en-il.js",
"./en-in": "./node_modules/moment/locale/en-in.js",
"./en-in.js": "./node_modules/moment/locale/en-in.js",
"./en-nz": "./node_modules/moment/locale/en-nz.js",
"./en-nz.js": "./node_modules/moment/locale/en-nz.js",
"./en-sg": "./node_modules/moment/locale/en-sg.js",
"./en-sg.js": "./node_modules/moment/locale/en-sg.js",
"./eo": "./node_modules/moment/locale/eo.js",
"./eo.js": "./node_modules/moment/locale/eo.js",
"./es": "./node_modules/moment/locale/es.js",
"./es-do": "./node_modules/moment/locale/es-do.js",
"./es-do.js": "./node_modules/moment/locale/es-do.js",
"./es-mx": "./node_modules/moment/locale/es-mx.js",
"./es-mx.js": "./node_modules/moment/locale/es-mx.js",
"./es-us": "./node_modules/moment/locale/es-us.js",
"./es-us.js": "./node_modules/moment/locale/es-us.js",
"./es.js": "./node_modules/moment/locale/es.js",
"./et": "./node_modules/moment/locale/et.js",
"./et.js": "./node_modules/moment/locale/et.js",
"./eu": "./node_modules/moment/locale/eu.js",
"./eu.js": "./node_modules/moment/locale/eu.js",
"./fa": "./node_modules/moment/locale/fa.js",
"./fa.js": "./node_modules/moment/locale/fa.js",
"./fi": "./node_modules/moment/locale/fi.js",
"./fi.js": "./node_modules/moment/locale/fi.js",
"./fil": "./node_modules/moment/locale/fil.js",
"./fil.js": "./node_modules/moment/locale/fil.js",
"./fo": "./node_modules/moment/locale/fo.js",
"./fo.js": "./node_modules/moment/locale/fo.js",
"./fr": "./node_modules/moment/locale/fr.js",
"./fr-ca": "./node_modules/moment/locale/fr-ca.js",
"./fr-ca.js": "./node_modules/moment/locale/fr-ca.js",
"./fr-ch": "./node_modules/moment/locale/fr-ch.js",
"./fr-ch.js": "./node_modules/moment/locale/fr-ch.js",
"./fr.js": "./node_modules/moment/locale/fr.js",
"./fy": "./node_modules/moment/locale/fy.js",
"./fy.js": "./node_modules/moment/locale/fy.js",
"./ga": "./node_modules/moment/locale/ga.js",
"./ga.js": "./node_modules/moment/locale/ga.js",
"./gd": "./node_modules/moment/locale/gd.js",
"./gd.js": "./node_modules/moment/locale/gd.js",
"./gl": "./node_modules/moment/locale/gl.js",
"./gl.js": "./node_modules/moment/locale/gl.js",
"./gom-deva": "./node_modules/moment/locale/gom-deva.js",
"./gom-deva.js": "./node_modules/moment/locale/gom-deva.js",
"./gom-latn": "./node_modules/moment/locale/gom-latn.js",
"./gom-latn.js": "./node_modules/moment/locale/gom-latn.js",
"./gu": "./node_modules/moment/locale/gu.js",
"./gu.js": "./node_modules/moment/locale/gu.js",
"./he": "./node_modules/moment/locale/he.js",
"./he.js": "./node_modules/moment/locale/he.js",
"./hi": "./node_modules/moment/locale/hi.js",
"./hi.js": "./node_modules/moment/locale/hi.js",
"./hr": "./node_modules/moment/locale/hr.js",
"./hr.js": "./node_modules/moment/locale/hr.js",
"./hu": "./node_modules/moment/locale/hu.js",
"./hu.js": "./node_modules/moment/locale/hu.js",
"./hy-am": "./node_modules/moment/locale/hy-am.js",
"./hy-am.js": "./node_modules/moment/locale/hy-am.js",
"./id": "./node_modules/moment/locale/id.js",
"./id.js": "./node_modules/moment/locale/id.js",
"./is": "./node_modules/moment/locale/is.js",
"./is.js": "./node_modules/moment/locale/is.js",
"./it": "./node_modules/moment/locale/it.js",
"./it-ch": "./node_modules/moment/locale/it-ch.js",
"./it-ch.js": "./node_modules/moment/locale/it-ch.js",
"./it.js": "./node_modules/moment/locale/it.js",
"./ja": "./node_modules/moment/locale/ja.js",
"./ja.js": "./node_modules/moment/locale/ja.js",
"./jv": "./node_modules/moment/locale/jv.js",
"./jv.js": "./node_modules/moment/locale/jv.js",
"./ka": "./node_modules/moment/locale/ka.js",
"./ka.js": "./node_modules/moment/locale/ka.js",
"./kk": "./node_modules/moment/locale/kk.js",
"./kk.js": "./node_modules/moment/locale/kk.js",
"./km": "./node_modules/moment/locale/km.js",
"./km.js": "./node_modules/moment/locale/km.js",
"./kn": "./node_modules/moment/locale/kn.js",
"./kn.js": "./node_modules/moment/locale/kn.js",
"./ko": "./node_modules/moment/locale/ko.js",
"./ko.js": "./node_modules/moment/locale/ko.js",
"./ku": "./node_modules/moment/locale/ku.js",
"./ku.js": "./node_modules/moment/locale/ku.js",
"./ky": "./node_modules/moment/locale/ky.js",
"./ky.js": "./node_modules/moment/locale/ky.js",
"./lb": "./node_modules/moment/locale/lb.js",
"./lb.js": "./node_modules/moment/locale/lb.js",
"./lo": "./node_modules/moment/locale/lo.js",
"./lo.js": "./node_modules/moment/locale/lo.js",
"./lt": "./node_modules/moment/locale/lt.js",
"./lt.js": "./node_modules/moment/locale/lt.js",
"./lv": "./node_modules/moment/locale/lv.js",
"./lv.js": "./node_modules/moment/locale/lv.js",
"./me": "./node_modules/moment/locale/me.js",
"./me.js": "./node_modules/moment/locale/me.js",
"./mi": "./node_modules/moment/locale/mi.js",
"./mi.js": "./node_modules/moment/locale/mi.js",
"./mk": "./node_modules/moment/locale/mk.js",
"./mk.js": "./node_modules/moment/locale/mk.js",
"./ml": "./node_modules/moment/locale/ml.js",
"./ml.js": "./node_modules/moment/locale/ml.js",
"./mn": "./node_modules/moment/locale/mn.js",
"./mn.js": "./node_modules/moment/locale/mn.js",
"./mr": "./node_modules/moment/locale/mr.js",
"./mr.js": "./node_modules/moment/locale/mr.js",
"./ms": "./node_modules/moment/locale/ms.js",
"./ms-my": "./node_modules/moment/locale/ms-my.js",
"./ms-my.js": "./node_modules/moment/locale/ms-my.js",
"./ms.js": "./node_modules/moment/locale/ms.js",
"./mt": "./node_modules/moment/locale/mt.js",
"./mt.js": "./node_modules/moment/locale/mt.js",
"./my": "./node_modules/moment/locale/my.js",
"./my.js": "./node_modules/moment/locale/my.js",
"./nb": "./node_modules/moment/locale/nb.js",
"./nb.js": "./node_modules/moment/locale/nb.js",
"./ne": "./node_modules/moment/locale/ne.js",
"./ne.js": "./node_modules/moment/locale/ne.js",
"./nl": "./node_modules/moment/locale/nl.js",
"./nl-be": "./node_modules/moment/locale/nl-be.js",
"./nl-be.js": "./node_modules/moment/locale/nl-be.js",
"./nl.js": "./node_modules/moment/locale/nl.js",
"./nn": "./node_modules/moment/locale/nn.js",
"./nn.js": "./node_modules/moment/locale/nn.js",
"./oc-lnc": "./node_modules/moment/locale/oc-lnc.js",
"./oc-lnc.js": "./node_modules/moment/locale/oc-lnc.js",
"./pa-in": "./node_modules/moment/locale/pa-in.js",
"./pa-in.js": "./node_modules/moment/locale/pa-in.js",
"./pl": "./node_modules/moment/locale/pl.js",
"./pl.js": "./node_modules/moment/locale/pl.js",
"./pt": "./node_modules/moment/locale/pt.js",
"./pt-br": "./node_modules/moment/locale/pt-br.js",
"./pt-br.js": "./node_modules/moment/locale/pt-br.js",
"./pt.js": "./node_modules/moment/locale/pt.js",
"./ro": "./node_modules/moment/locale/ro.js",
"./ro.js": "./node_modules/moment/locale/ro.js",
"./ru": "./node_modules/moment/locale/ru.js",
"./ru.js": "./node_modules/moment/locale/ru.js",
"./sd": "./node_modules/moment/locale/sd.js",
"./sd.js": "./node_modules/moment/locale/sd.js",
"./se": "./node_modules/moment/locale/se.js",
"./se.js": "./node_modules/moment/locale/se.js",
"./si": "./node_modules/moment/locale/si.js",
"./si.js": "./node_modules/moment/locale/si.js",
"./sk": "./node_modules/moment/locale/sk.js",
"./sk.js": "./node_modules/moment/locale/sk.js",
"./sl": "./node_modules/moment/locale/sl.js",
"./sl.js": "./node_modules/moment/locale/sl.js",
"./sq": "./node_modules/moment/locale/sq.js",
"./sq.js": "./node_modules/moment/locale/sq.js",
"./sr": "./node_modules/moment/locale/sr.js",
"./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js",
"./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js",
"./sr.js": "./node_modules/moment/locale/sr.js",
"./ss": "./node_modules/moment/locale/ss.js",
"./ss.js": "./node_modules/moment/locale/ss.js",
"./sv": "./node_modules/moment/locale/sv.js",
"./sv.js": "./node_modules/moment/locale/sv.js",
"./sw": "./node_modules/moment/locale/sw.js",
"./sw.js": "./node_modules/moment/locale/sw.js",
"./ta": "./node_modules/moment/locale/ta.js",
"./ta.js": "./node_modules/moment/locale/ta.js",
"./te": "./node_modules/moment/locale/te.js",
"./te.js": "./node_modules/moment/locale/te.js",
"./tet": "./node_modules/moment/locale/tet.js",
"./tet.js": "./node_modules/moment/locale/tet.js",
"./tg": "./node_modules/moment/locale/tg.js",
"./tg.js": "./node_modules/moment/locale/tg.js",
"./th": "./node_modules/moment/locale/th.js",
"./th.js": "./node_modules/moment/locale/th.js",
"./tk": "./node_modules/moment/locale/tk.js",
"./tk.js": "./node_modules/moment/locale/tk.js",
"./tl-ph": "./node_modules/moment/locale/tl-ph.js",
"./tl-ph.js": "./node_modules/moment/locale/tl-ph.js",
"./tlh": "./node_modules/moment/locale/tlh.js",
"./tlh.js": "./node_modules/moment/locale/tlh.js",
"./tr": "./node_modules/moment/locale/tr.js",
"./tr.js": "./node_modules/moment/locale/tr.js",
"./tzl": "./node_modules/moment/locale/tzl.js",
"./tzl.js": "./node_modules/moment/locale/tzl.js",
"./tzm": "./node_modules/moment/locale/tzm.js",
"./tzm-latn": "./node_modules/moment/locale/tzm-latn.js",
"./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js",
"./tzm.js": "./node_modules/moment/locale/tzm.js",
"./ug-cn": "./node_modules/moment/locale/ug-cn.js",
"./ug-cn.js": "./node_modules/moment/locale/ug-cn.js",
"./uk": "./node_modules/moment/locale/uk.js",
"./uk.js": "./node_modules/moment/locale/uk.js",
"./ur": "./node_modules/moment/locale/ur.js",
"./ur.js": "./node_modules/moment/locale/ur.js",
"./uz": "./node_modules/moment/locale/uz.js",
"./uz-latn": "./node_modules/moment/locale/uz-latn.js",
"./uz-latn.js": "./node_modules/moment/locale/uz-latn.js",
"./uz.js": "./node_modules/moment/locale/uz.js",
"./vi": "./node_modules/moment/locale/vi.js",
"./vi.js": "./node_modules/moment/locale/vi.js",
"./x-pseudo": "./node_modules/moment/locale/x-pseudo.js",
"./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js",
"./yo": "./node_modules/moment/locale/yo.js",
"./yo.js": "./node_modules/moment/locale/yo.js",
"./zh-cn": "./node_modules/moment/locale/zh-cn.js",
"./zh-cn.js": "./node_modules/moment/locale/zh-cn.js",
"./zh-hk": "./node_modules/moment/locale/zh-hk.js",
"./zh-hk.js": "./node_modules/moment/locale/zh-hk.js",
"./zh-mo": "./node_modules/moment/locale/zh-mo.js",
"./zh-mo.js": "./node_modules/moment/locale/zh-mo.js",
"./zh-tw": "./node_modules/moment/locale/zh-tw.js",
"./zh-tw.js": "./node_modules/moment/locale/zh-tw.js"
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
if(!__webpack_require__.o(map, req)) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return map[req];
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./node_modules/moment/locale sync recursive ^\\.\\/.*$";
/***/ }),
/***/ "./node_modules/moment/moment.js":
/*!***************************************!*\
!*** ./node_modules/moment/moment.js ***!
\***************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
/* module decorator */ module = __webpack_require__.nmd(module);
//! moment.js
//! version : 2.29.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
true ? module.exports = factory() :
0
}(this, (function () { 'use strict';
var hookCallback;
function hooks() {
return hookCallback.apply(null, arguments);
}
// This is done to register the method called with moment()
// without creating circular dependencies.
function setHookCallback(callback) {
hookCallback = callback;
}
function isArray(input) {
return (
input instanceof Array ||
Object.prototype.toString.call(input) === '[object Array]'
);
}
function isObject(input) {
// IE8 will treat undefined and null as object if it wasn't for
// input != null
return (
input != null &&
Object.prototype.toString.call(input) === '[object Object]'
);
}
function hasOwnProp(a, b) {
return Object.prototype.hasOwnProperty.call(a, b);
}
function isObjectEmpty(obj) {
if (Object.getOwnPropertyNames) {
return Object.getOwnPropertyNames(obj).length === 0;
} else {
var k;
for (k in obj) {
if (hasOwnProp(obj, k)) {
return false;
}
}
return true;
}
}
function isUndefined(input) {
return input === void 0;
}
function isNumber(input) {
return (
typeof input === 'number' ||
Object.prototype.toString.call(input) === '[object Number]'
);
}
function isDate(input) {
return (
input instanceof Date ||
Object.prototype.toString.call(input) === '[object Date]'
);
}
function map(arr, fn) {
var res = [],
i;
for (i = 0; i < arr.length; ++i) {
res.push(fn(arr[i], i));
}
return res;
}
function extend(a, b) {
for (var i in b) {
if (hasOwnProp(b, i)) {
a[i] = b[i];
}
}
if (hasOwnProp(b, 'toString')) {
a.toString = b.toString;
}
if (hasOwnProp(b, 'valueOf')) {
a.valueOf = b.valueOf;
}
return a;
}
function createUTC(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, true).utc();
}
function defaultParsingFlags() {
// We need to deep clone this object.
return {
empty: false,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: false,
invalidEra: null,
invalidMonth: null,
invalidFormat: false,
userInvalidated: false,
iso: false,
parsedDateParts: [],
era: null,
meridiem: null,
rfc2822: false,
weekdayMismatch: false,
};
}
function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function (fun) {
var t = Object(this),
len = t.length >>> 0,
i;
for (i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function isValid(m) {
if (m._isValid == null) {
var flags = getParsingFlags(m),
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
}),
isNowValid =
!isNaN(m._d.getTime()) &&
flags.overflow < 0 &&
!flags.empty &&
!flags.invalidEra &&
!flags.invalidMonth &&
!flags.invalidWeekday &&
!flags.weekdayMismatch &&
!flags.nullInput &&
!flags.invalidFormat &&
!flags.userInvalidated &&
(!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) {
isNowValid =
isNowValid &&
flags.charsLeftOver === 0 &&
flags.unusedTokens.length === 0 &&
flags.bigHour === undefined;
}
if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid;
} else {
return isNowValid;
}
}
return m._isValid;
}
function createInvalid(flags) {
var m = createUTC(NaN);
if (flags != null) {
extend(getParsingFlags(m), flags);
} else {
getParsingFlags(m).userInvalidated = true;
}
return m;
}
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
var momentProperties = (hooks.momentProperties = []),
updateInProgress = false;
function copyConfig(to, from) {
var i, prop, val;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
}
if (!isUndefined(from._i)) {
to._i = from._i;
}
if (!isUndefined(from._f)) {
to._f = from._f;
}
if (!isUndefined(from._l)) {
to._l = from._l;
}
if (!isUndefined(from._strict)) {
to._strict = from._strict;
}
if (!isUndefined(from._tzm)) {
to._tzm = from._tzm;
}
if (!isUndefined(from._isUTC)) {
to._isUTC = from._isUTC;
}
if (!isUndefined(from._offset)) {
to._offset = from._offset;
}
if (!isUndefined(from._pf)) {
to._pf = getParsingFlags(from);
}
if (!isUndefined(from._locale)) {
to._locale = from._locale;
}
if (momentProperties.length > 0) {
for (i = 0; i < momentProperties.length; i++) {
prop = momentProperties[i];
val = from[prop];
if (!isUndefined(val)) {
to[prop] = val;
}
}
}
return to;
}
// Moment prototype object
function Moment(config) {
copyConfig(this, config);
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
if (!this.isValid()) {
this._d = new Date(NaN);
}
// Prevent infinite loop in case updateOffset creates new moment
// objects.
if (updateInProgress === false) {
updateInProgress = true;
hooks.updateOffset(this);
updateInProgress = false;
}
}
function isMoment(obj) {
return (
obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
);
}
function warn(msg) {
if (
hooks.suppressDeprecationWarnings === false &&
typeof console !== 'undefined' &&
console.warn
) {
console.warn('Deprecation warning: ' + msg);
}
}
function deprecate(msg, fn) {
var firstTime = true;
return extend(function () {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(null, msg);
}
if (firstTime) {
var args = [],
arg,
i,
key;
for (i = 0; i < arguments.length; i++) {
arg = '';
if (typeof arguments[i] === 'object') {
arg += '\n[' + i + '] ';
for (key in arguments[0]) {
if (hasOwnProp(arguments[0], key)) {
arg += key + ': ' + arguments[0][key] + ', ';
}
}
arg = arg.slice(0, -2); // Remove trailing comma and space
} else {
arg = arguments[i];
}
args.push(arg);
}
warn(
msg +
'\nArguments: ' +
Array.prototype.slice.call(args).join('') +
'\n' +
new Error().stack
);
firstTime = false;
}
return fn.apply(this, arguments);
}, fn);
}
var deprecations = {};
function deprecateSimple(name, msg) {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) {
warn(msg);
deprecations[name] = true;
}
}
hooks.suppressDeprecationWarnings = false;
hooks.deprecationHandler = null;
function isFunction(input) {
return (
(typeof Function !== 'undefined' && input instanceof Function) ||
Object.prototype.toString.call(input) === '[object Function]'
);
}
function set(config) {
var prop, i;
for (i in config) {
if (hasOwnProp(config, i)) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
}
this._config = config;
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
// TODO: Remove "ordinalParse" fallback in next major release.
this._dayOfMonthOrdinalParseLenient = new RegExp(
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
'|' +
/\d{1,2}/.source
);
}
function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig),
prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (
hasOwnProp(parentConfig, prop) &&
!hasOwnProp(childConfig, prop) &&
isObject(parentConfig[prop])
) {
// make sure changes to properties don't modify parent config
res[prop] = extend({}, res[prop]);
}
}
return res;
}
function Locale(config) {
if (config != null) {
this.set(config);
}
}
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function (obj) {
var i,
res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
var defaultCalendar = {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
};
function calendar(key, mom, now) {
var output = this._calendar[key] || this._calendar['sameElse'];
return isFunction(output) ? output.call(mom, now) : output;
}
function zeroFill(number, targetLength, forceSign) {
var absNumber = '' + Math.abs(number),
zerosToFill = targetLength - absNumber.length,
sign = number >= 0;
return (
(sign ? (forceSign ? '+' : '') : '-') +
Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
absNumber
);
}
var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
formatFunctions = {},
formatTokenFunctions = {};
// token: 'M'
// padded: ['MM', 2]
// ordinal: 'Mo'
// callback: function () { this.month() + 1 }
function addFormatToken(token, padded, ordinal, callback) {
var func = callback;
if (typeof callback === 'string') {
func = function () {
return this[callback]();
};
}
if (token) {
formatTokenFunctions[token] = func;
}
if (padded) {
formatTokenFunctions[padded[0]] = function () {
return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
};
}
if (ordinal) {
formatTokenFunctions[ordinal] = function () {
return this.localeData().ordinal(
func.apply(this, arguments),
token
);
};
}
}
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, '');
}
return input.replace(/\\/g, '');
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens),
i,
length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = '',
i;
for (i = 0; i < length; i++) {
output += isFunction(array[i])
? array[i].call(mom, format)
: array[i];
}
return output;
};
}
// format date using native date object
function formatMoment(m, format) {
if (!m.isValid()) {
return m.localeData().invalidDate();
}
format = expandFormat(format, m.localeData());
formatFunctions[format] =
formatFunctions[format] || makeFormatFunction(format);
return formatFunctions[format](m);
}
function expandFormat(format, locale) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return locale.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(
localFormattingTokens,
replaceLongDateFormatTokens
);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
var defaultLongDateFormat = {
LTS: 'h:mm:ss A',
LT: 'h:mm A',
L: 'MM/DD/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY h:mm A',
LLLL: 'dddd, MMMM D, YYYY h:mm A',
};
function longDateFormat(key) {
var format = this._longDateFormat[key],
formatUpper = this._longDateFormat[key.toUpperCase()];
if (format || !formatUpper) {
return format;
}
this._longDateFormat[key] = formatUpper
.match(formattingTokens)
.map(function (tok) {
if (
tok === 'MMMM' ||
tok === 'MM' ||
tok === 'DD' ||
tok === 'dddd'
) {
return tok.slice(1);
}
return tok;
})
.join('');
return this._longDateFormat[key];
}
var defaultInvalidDate = 'Invalid date';
function invalidDate() {
return this._invalidDate;
}
var defaultOrdinal = '%d',
defaultDayOfMonthOrdinalParse = /\d{1,2}/;
function ordinal(number) {
return this._ordinal.replace('%d', number);
}
var defaultRelativeTime = {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
w: 'a week',
ww: '%d weeks',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
};
function relativeTime(number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return isFunction(output)
? output(number, withoutSuffix, string, isFuture)
: output.replace(/%d/i, number);
}
function pastFuture(diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
var aliases = {};
function addUnitAlias(unit, shorthand) {
var lowerCase = unit.toLowerCase();
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
}
function normalizeUnits(units) {
return typeof units === 'string'
? aliases[units] || aliases[units.toLowerCase()]
: undefined;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (hasOwnProp(inputObject, prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
var priorities = {};
function addUnitPriority(unit, priority) {
priorities[unit] = priority;
}
function getPrioritizedUnits(unitsObj) {
var units = [],
u;
for (u in unitsObj) {
if (hasOwnProp(unitsObj, u)) {
units.push({ unit: u, priority: priorities[u] });
}
}
units.sort(function (a, b) {
return a.priority - b.priority;
});
return units;
}
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
function absFloor(number) {
if (number < 0) {
// -0 -> 0
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
function makeGetSet(unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
return mom.isValid()
? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
: NaN;
}
function set$1(mom, unit, value) {
if (mom.isValid() && !isNaN(value)) {
if (
unit === 'FullYear' &&
isLeapYear(mom.year()) &&
mom.month() === 1 &&
mom.date() === 29
) {
value = toInt(value);
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
value,
mom.month(),
daysInMonth(value, mom.month())
);
} else {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
}
}
}
// MOMENTS
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units),
i;
for (i = 0; i < prioritized.length; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
var match1 = /\d/, // 0 - 9
match2 = /\d\d/, // 00 - 99
match3 = /\d{3}/, // 000 - 999
match4 = /\d{4}/, // 0000 - 9999
match6 = /[+-]?\d{6}/, // -999999 - 999999
match1to2 = /\d\d?/, // 0 - 99
match3to4 = /\d\d\d\d?/, // 999 - 9999
match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
match1to3 = /\d{1,3}/, // 0 - 999
match1to4 = /\d{1,4}/, // 0 - 9999
match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
matchUnsigned = /\d+/, // 0 - inf
matchSigned = /[+-]?\d+/, // -inf - inf
matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
// any word (or two) characters or numbers including two/three word month in arabic.
// includes scottish gaelic two word and hyphenated months
matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
regexes;
regexes = {};
function addRegexToken(token, regex, strictRegex) {
regexes[token] = isFunction(regex)
? regex
: function (isStrict, localeData) {
return isStrict && strictRegex ? strictRegex : regex;
};
}
function getParseRegexForToken(token, config) {
if (!hasOwnProp(regexes, token)) {
return new RegExp(unescapeFormat(token));
}
return regexes[token](config._strict, config._locale);
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function unescapeFormat(s) {
return regexEscape(
s
.replace('\\', '')
.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
matched,
p1,
p2,
p3,
p4
) {
return p1 || p2 || p3 || p4;
})
);
}
function regexEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
var tokens = {};
function addParseToken(token, callback) {
var i,
func = callback;
if (typeof token === 'string') {
token = [token];
}
if (isNumber(callback)) {
func = function (input, array) {
array[callback] = toInt(input);
};
}
for (i = 0; i < token.length; i++) {
tokens[token[i]] = func;
}
}
function addWeekParseToken(token, callback) {
addParseToken(token, function (input, array, config, token) {
config._w = config._w || {};
callback(input, config._w, config, token);
});
}
function addTimeToArrayFromToken(token, input, config) {
if (input != null && hasOwnProp(tokens, token)) {
tokens[token](input, config._a, config, token);
}
}
var YEAR = 0,
MONTH = 1,
DATE = 2,
HOUR = 3,
MINUTE = 4,
SECOND = 5,
MILLISECOND = 6,
WEEK = 7,
WEEKDAY = 8;
function mod(n, x) {
return ((n % x) + x) % x;
}
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function (o) {
// I know
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth(year, month) {
if (isNaN(year) || isNaN(month)) {
return NaN;
}
var modMonth = mod(month, 12);
year += (month - modMonth) / 12;
return modMonth === 1
? isLeapYear(year)
? 29
: 28
: 31 - ((modMonth % 7) % 2);
}
// FORMATTING
addFormatToken('M', ['MM', 2], 'Mo', function () {
return this.month() + 1;
});
addFormatToken('MMM', 0, 0, function (format) {
return this.localeData().monthsShort(this, format);
});
addFormatToken('MMMM', 0, 0, function (format) {
return this.localeData().months(this, format);
});
// ALIASES
addUnitAlias('month', 'M');
// PRIORITY
addUnitPriority('month', 8);
// PARSING
addRegexToken('M', match1to2);
addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict);
});
addRegexToken('MMMM', function (isStrict, locale) {
return locale.monthsRegex(isStrict);
});
addParseToken(['M', 'MM'], function (input, array) {
array[MONTH] = toInt(input) - 1;
});
addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
var month = config._locale.monthsParse(input, token, config._strict);
// if we didn't find a month name, mark the date as invalid.
if (month != null) {
array[MONTH] = month;
} else {
getParsingFlags(config).invalidMonth = input;
}
});
// LOCALES
var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
'_'
),
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
defaultMonthsShortRegex = matchWord,
defaultMonthsRegex = matchWord;
function localeMonths(m, format) {
if (!m) {
return isArray(this._months)
? this._months
: this._months['standalone'];
}
return isArray(this._months)
? this._months[m.month()]
: this._months[
(this._months.isFormat || MONTHS_IN_FORMAT).test(format)
? 'format'
: 'standalone'
][m.month()];
}
function localeMonthsShort(m, format) {
if (!m) {
return isArray(this._monthsShort)
? this._monthsShort
: this._monthsShort['standalone'];
}
return isArray(this._monthsShort)
? this._monthsShort[m.month()]
: this._monthsShort[
MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
][m.month()];
}
function handleStrictParse(monthName, format, strict) {
var i,
ii,
mom,
llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = createUTC([2000, i]);
this._shortMonthsParse[i] = this.monthsShort(
mom,
''
).toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse(monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format, strict);
}
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp(
'^' + this.months(mom, '').replace('.', '') + '$',
'i'
);
this._shortMonthsParse[i] = new RegExp(
'^' + this.monthsShort(mom, '').replace('.', '') + '$',
'i'
);
}
if (!strict && !this._monthsParse[i]) {
regex =
'^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (
strict &&
format === 'MMMM' &&
this._longMonthsParse[i].test(monthName)
) {
return i;
} else if (
strict &&
format === 'MMM' &&
this._shortMonthsParse[i].test(monthName)
) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
return i;
}
}
}
// MOMENTS
function setMonth(mom, value) {
var dayOfMonth;
if (!mom.isValid()) {
// No op
return mom;
}
if (typeof value === 'string') {
if (/^\d+$/.test(value)) {
value = toInt(value);
} else {
value = mom.localeData().monthsParse(value);
// TODO: Another silent failure?
if (!isNumber(value)) {
return mom;
}
}
}
dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
return mom;
}
function getSetMonth(value) {
if (value != null) {
setMonth(this, value);
hooks.updateOffset(this, true);
return this;
} else {
return get(this, 'Month');
}
}
function getDaysInMonth() {
return daysInMonth(this.year(), this.month());
}
function monthsShortRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsShortStrictRegex;
} else {
return this._monthsShortRegex;
}
} else {
if (!hasOwnProp(this, '_monthsShortRegex')) {
this._monthsShortRegex = defaultMonthsShortRegex;
}
return this._monthsShortStrictRegex && isStrict
? this._monthsShortStrictRegex
: this._monthsShortRegex;
}
}
function monthsRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsStrictRegex;
} else {
return this._monthsRegex;
}
} else {
if (!hasOwnProp(this, '_monthsRegex')) {
this._monthsRegex = defaultMonthsRegex;
}
return this._monthsStrictRegex && isStrict
? this._monthsStrictRegex
: this._monthsRegex;
}
}
function computeMonthsParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom;
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
shortPieces.push(this.monthsShort(mom, ''));
longPieces.push(this.months(mom, ''));
mixedPieces.push(this.months(mom, ''));
mixedPieces.push(this.monthsShort(mom, ''));
}
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
for (i = 0; i < 12; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
}
for (i = 0; i < 24; i++) {
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp(
'^(' + longPieces.join('|') + ')',
'i'
);
this._monthsShortStrictRegex = new RegExp(
'^(' + shortPieces.join('|') + ')',
'i'
);
}
// FORMATTING
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
// ALIASES
addUnitAlias('year', 'y');
// PRIORITIES
addUnitPriority('year', 1);
// PARSING
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] =
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
// HELPERS
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
// HOOKS
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
// MOMENTS
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear() {
return isLeapYear(this.year());
}
function createDate(y, m, d, h, M, s, ms) {
// can't just apply() to create a date:
// https://stackoverflow.com/q/181348
var date;
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
date = new Date(y + 400, m, d, h, M, s, ms);
if (isFinite(date.getFullYear())) {
date.setFullYear(y);
}
} else {
date = new Date(y, m, d, h, M, s, ms);
}
return date;
}
function createUTCDate(y) {
var date, args;
// the Date.UTC function remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
args = Array.prototype.slice.call(arguments);
// preserve leap years using a full 400 year cycle, then reset
args[0] = y + 400;
date = new Date(Date.UTC.apply(null, args));
if (isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
} else {
date = new Date(Date.UTC.apply(null, arguments));
}
return date;
}
// start-of-first-week - start-of-year
function firstWeekOffset(year, dow, doy) {
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
fwd = 7 + dow - doy,
// first-week day local weekday -- which local weekday is fwd
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
var localWeekday = (7 + weekday - dow) % 7,
weekOffset = firstWeekOffset(year, dow, doy),
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
resYear,
resDayOfYear;
if (dayOfYear <= 0) {
resYear = year - 1;
resDayOfYear = daysInYear(resYear) + dayOfYear;
} else if (dayOfYear > daysInYear(year)) {
resYear = year + 1;
resDayOfYear = dayOfYear - daysInYear(year);
} else {
resYear = year;
resDayOfYear = dayOfYear;
}
return {
year: resYear,
dayOfYear: resDayOfYear,
};
}
function weekOfYear(mom, dow, doy) {
var weekOffset = firstWeekOffset(mom.year(), dow, doy),
week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
resWeek,
resYear;
if (week < 1) {
resYear = mom.year() - 1;
resWeek = week + weeksInYear(resYear, dow, doy);
} else if (week > weeksInYear(mom.year(), dow, doy)) {
resWeek = week - weeksInYear(mom.year(), dow, doy);
resYear = mom.year() + 1;
} else {
resYear = mom.year();
resWeek = week;
}
return {
week: resWeek,
year: resYear,
};
}
function weeksInYear(year, dow, doy) {
var weekOffset = firstWeekOffset(year, dow, doy),
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
}
// FORMATTING
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
// ALIASES
addUnitAlias('week', 'w');
addUnitAlias('isoWeek', 'W');
// PRIORITIES
addUnitPriority('week', 5);
addUnitPriority('isoWeek', 5);
// PARSING
addRegexToken('w', match1to2);
addRegexToken('ww', match1to2, match2);
addRegexToken('W', match1to2);
addRegexToken('WW', match1to2, match2);
addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
input,
week,
config,
token
) {
week[token.substr(0, 1)] = toInt(input);
});
// HELPERS
// LOCALES
function localeWeek(mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
var defaultLocaleWeek = {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
};
function localeFirstDayOfWeek() {
return this._week.dow;
}
function localeFirstDayOfYear() {
return this._week.doy;
}
// MOMENTS
function getSetWeek(input) {
var week = this.localeData().week(this);
return input == null ? week : this.add((input - week) * 7, 'd');
}
function getSetISOWeek(input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add((input - week) * 7, 'd');
}
// FORMATTING
addFormatToken('d', 0, 'do', 'day');
addFormatToken('dd', 0, 0, function (format) {
return this.localeData().weekdaysMin(this, format);
});
addFormatToken('ddd', 0, 0, function (format) {
return this.localeData().weekdaysShort(this, format);
});
addFormatToken('dddd', 0, 0, function (format) {
return this.localeData().weekdays(this, format);
});
addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday');
// ALIASES
addUnitAlias('day', 'd');
addUnitAlias('weekday', 'e');
addUnitAlias('isoWeekday', 'E');
// PRIORITY
addUnitPriority('day', 11);
addUnitPriority('weekday', 11);
addUnitPriority('isoWeekday', 11);
// PARSING
addRegexToken('d', match1to2);
addRegexToken('e', match1to2);
addRegexToken('E', match1to2);
addRegexToken('dd', function (isStrict, locale) {
return locale.weekdaysMinRegex(isStrict);
});
addRegexToken('ddd', function (isStrict, locale) {
return locale.weekdaysShortRegex(isStrict);
});
addRegexToken('dddd', function (isStrict, locale) {
return locale.weekdaysRegex(isStrict);
});
addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
var weekday = config._locale.weekdaysParse(input, token, config._strict);
// if we didn't get a weekday name, mark the date as invalid
if (weekday != null) {
week.d = weekday;
} else {
getParsingFlags(config).invalidWeekday = input;
}
});
addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
week[token] = toInt(input);
});
// HELPERS
function parseWeekday(input, locale) {
if (typeof input !== 'string') {
return input;
}
if (!isNaN(input)) {
return parseInt(input, 10);
}
input = locale.weekdaysParse(input);
if (typeof input === 'number') {
return input;
}
return null;
}
function parseIsoWeekday(input, locale) {
if (typeof input === 'string') {
return locale.weekdaysParse(input) % 7 || 7;
}
return isNaN(input) ? null : input;
}
// LOCALES
function shiftWeekdays(ws, n) {
return ws.slice(n, 7).concat(ws.slice(0, n));
}
var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
'_'
),
defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
defaultWeekdaysRegex = matchWord,
defaultWeekdaysShortRegex = matchWord,
defaultWeekdaysMinRegex = matchWord;
function localeWeekdays(m, format) {
var weekdays = isArray(this._weekdays)
? this._weekdays
: this._weekdays[
m && m !== true && this._weekdays.isFormat.test(format)
? 'format'
: 'standalone'
];
return m === true
? shiftWeekdays(weekdays, this._week.dow)
: m
? weekdays[m.day()]
: weekdays;
}
function localeWeekdaysShort(m) {
return m === true
? shiftWeekdays(this._weekdaysShort, this._week.dow)
: m
? this._weekdaysShort[m.day()]
: this._weekdaysShort;
}
function localeWeekdaysMin(m) {
return m === true
? shiftWeekdays(this._weekdaysMin, this._week.dow)
: m
? this._weekdaysMin[m.day()]
: this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
var i,
ii,
mom,
llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = createUTC([2000, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(
mom,
''
).toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(
mom,
''
).toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse(weekdayName, format, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return handleStrictParse$1.call(this, weekdayName, format, strict);
}
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._minWeekdaysParse = [];
this._shortWeekdaysParse = [];
this._fullWeekdaysParse = [];
}
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp(
'^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
'i'
);
this._shortWeekdaysParse[i] = new RegExp(
'^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
'i'
);
this._minWeekdaysParse[i] = new RegExp(
'^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
'i'
);
}
if (!this._weekdaysParse[i]) {
regex =
'^' +
this.weekdays(mom, '') +
'|^' +
this.weekdaysShort(mom, '') +
'|^' +
this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (
strict &&
format === 'dddd' &&
this._fullWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (
strict &&
format === 'ddd' &&
this._shortWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (
strict &&
format === 'dd' &&
this._minWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
}
// MOMENTS
function getSetDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd');
} else {
return day;
}
}
function getSetLocaleDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
return input == null ? weekday : this.add(input - weekday, 'd');
}
function getSetISODayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if (input != null) {
var weekday = parseIsoWeekday(input, this.localeData());
return this.day(this.day() % 7 ? weekday : weekday - 7);
} else {
return this.day() || 7;
}
}
function weekdaysRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysRegex')) {
this._weekdaysRegex = defaultWeekdaysRegex;
}
return this._weekdaysStrictRegex && isStrict
? this._weekdaysStrictRegex
: this._weekdaysRegex;
}
}
function weekdaysShortRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
}
return this._weekdaysShortStrictRegex && isStrict
? this._weekdaysShortStrictRegex
: this._weekdaysShortRegex;
}
}
function weekdaysMinRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
}
return this._weekdaysMinStrictRegex && isStrict
? this._weekdaysMinStrictRegex
: this._weekdaysMinRegex;
}
}
function computeWeekdaysParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [],
shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom,
minp,
shortp,
longp;
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
minp = regexEscape(this.weekdaysMin(mom, ''));
shortp = regexEscape(this.weekdaysShort(mom, ''));
longp = regexEscape(this.weekdays(mom, ''));
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp(
'^(' + longPieces.join('|') + ')',
'i'
);
this._weekdaysShortStrictRegex = new RegExp(
'^(' + shortPieces.join('|') + ')',
'i'
);
this._weekdaysMinStrictRegex = new RegExp(
'^(' + minPieces.join('|') + ')',
'i'
);
}
// FORMATTING
function hFormat() {
return this.hours() % 12 || 12;
}
function kFormat() {
return this.hours() || 24;
}
addFormatToken('H', ['HH', 2], 0, 'hour');
addFormatToken('h', ['hh', 2], 0, hFormat);
addFormatToken('k', ['kk', 2], 0, kFormat);
addFormatToken('hmm', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
});
addFormatToken('hmmss', 0, 0, function () {
return (
'' +
hFormat.apply(this) +
zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2)
);
});
addFormatToken('Hmm', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2);
});
addFormatToken('Hmmss', 0, 0, function () {
return (
'' +
this.hours() +
zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2)
);
});
function meridiem(token, lowercase) {
addFormatToken(token, 0, 0, function () {
return this.localeData().meridiem(
this.hours(),
this.minutes(),
lowercase
);
});
}
meridiem('a', true);
meridiem('A', false);
// ALIASES
addUnitAlias('hour', 'h');
// PRIORITY
addUnitPriority('hour', 13);
// PARSING
function matchMeridiem(isStrict, locale) {
return locale._meridiemParse;
}
addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem);
addRegexToken('H', match1to2);
addRegexToken('h', match1to2);
addRegexToken('k', match1to2);
addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2);
addRegexToken('hmm', match3to4);
addRegexToken('hmmss', match5to6);
addRegexToken('Hmm', match3to4);
addRegexToken('Hmmss', match5to6);
addParseToken(['H', 'HH'], HOUR);
addParseToken(['k', 'kk'], function (input, array, config) {
var kInput = toInt(input);
array[HOUR] = kInput === 24 ? 0 : kInput;
});
addParseToken(['a', 'A'], function (input, array, config) {
config._isPm = config._locale.isPM(input);
config._meridiem = input;
});
addParseToken(['h', 'hh'], function (input, array, config) {
array[HOUR] = toInt(input);
getParsingFlags(config).bigHour = true;
});
addParseToken('hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
getParsingFlags(config).bigHour = true;
});
addParseToken('hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
getParsingFlags(config).bigHour = true;
});
addParseToken('Hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
});
addParseToken('Hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
});
// LOCALES
function localeIsPM(input) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return (input + '').toLowerCase().charAt(0) === 'p';
}
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
// Setting the hour should keep the time, because the user explicitly
// specified which hour they want. So trying to maintain the same hour (in
// a new timezone) makes sense. Adding/subtracting hours does not follow
// this rule.
getSetHour = makeGetSet('Hours', true);
function localeMeridiem(hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
}
var baseConfig = {
calendar: defaultCalendar,
longDateFormat: defaultLongDateFormat,
invalidDate: defaultInvalidDate,
ordinal: defaultOrdinal,
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
relativeTime: defaultRelativeTime,
months: defaultLocaleMonths,
monthsShort: defaultLocaleMonthsShort,
week: defaultLocaleWeek,
weekdays: defaultLocaleWeekdays,
weekdaysMin: defaultLocaleWeekdaysMin,
weekdaysShort: defaultLocaleWeekdaysShort,
meridiemParse: defaultLocaleMeridiemParse,
};
// internal storage for locale config files
var locales = {},
localeFamilies = {},
globalLocale;
function commonPrefix(arr1, arr2) {
var i,
minl = Math.min(arr1.length, arr2.length);
for (i = 0; i < minl; i += 1) {
if (arr1[i] !== arr2[i]) {
return i;
}
}
return minl;
}
function normalizeLocale(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) {
var i = 0,
j,
next,
locale,
split;
while (i < names.length) {
split = normalizeLocale(names[i]).split('-');
j = split.length;
next = normalizeLocale(names[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
locale = loadLocale(split.slice(0, j).join('-'));
if (locale) {
return locale;
}
if (
next &&
next.length >= j &&
commonPrefix(split, next) >= j - 1
) {
//the next array item is better than a shallower substring of this one
break;
}
j--;
}
i++;
}
return globalLocale;
}
function loadLocale(name) {
var oldLocale = null,
aliasedRequire;
// TODO: Find a better way to register and load all the locales in Node
if (
locales[name] === undefined &&
"object" !== 'undefined' &&
module &&
module.exports
) {
try {
oldLocale = globalLocale._abbr;
aliasedRequire = undefined;
__webpack_require__("./node_modules/moment/locale sync recursive ^\\.\\/.*$")("./" + name);
getSetGlobalLocale(oldLocale);
} catch (e) {
// mark as not found to avoid repeating expensive file require call causing high CPU
// when trying to find en-US, en_US, en-us for every format call
locales[name] = null; // null means not found
}
}
return locales[name];
}
// This function will load locale and then set the global locale. If
// no arguments are passed in, it will simply return the current global
// locale key.
function getSetGlobalLocale(key, values) {
var data;
if (key) {
if (isUndefined(values)) {
data = getLocale(key);
} else {
data = defineLocale(key, values);
}
if (data) {
// moment.duration._locale = moment._locale = data;
globalLocale = data;
} else {
if (typeof console !== 'undefined' && console.warn) {
//warn user if arguments are passed but the locale could not be set
console.warn(
'Locale ' + key + ' not found. Did you forget to load it?'
);
}
}
}
return globalLocale._abbr;
}
function defineLocale(name, config) {
if (config !== null) {
var locale,
parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
deprecateSimple(
'defineLocaleOverride',
'use moment.updateLocale(localeName, config) to change ' +
'an existing locale. moment.defineLocale(localeName, ' +
'config) should only be used for creating a new locale ' +
'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
);
parentConfig = locales[name]._config;
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
parentConfig = locales[config.parentLocale]._config;
} else {
locale = loadLocale(config.parentLocale);
if (locale != null) {
parentConfig = locale._config;
} else {
if (!localeFamilies[config.parentLocale]) {
localeFamilies[config.parentLocale] = [];
}
localeFamilies[config.parentLocale].push({
name: name,
config: config,
});
return null;
}
}
}
locales[name] = new Locale(mergeConfigs(parentConfig, config));
if (localeFamilies[name]) {
localeFamilies[name].forEach(function (x) {
defineLocale(x.name, x.config);
});
}
// backwards compat for now: also set the locale
// make sure we set the locale AFTER all child locales have been
// created, so we won't end up with the child locale set.
getSetGlobalLocale(name);
return locales[name];
} else {
// useful for testing
delete locales[name];
return null;
}
}
function updateLocale(name, config) {
if (config != null) {
var locale,
tmpLocale,
parentConfig = baseConfig;
if (locales[name] != null && locales[name].parentLocale != null) {
// Update existing child locale in-place to avoid memory-leaks
locales[name].set(mergeConfigs(locales[name]._config, config));
} else {
// MERGE
tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
if (tmpLocale == null) {
// updateLocale is called for creating a new locale
// Set abbr so it will have a name (getters return
// undefined otherwise).
config.abbr = name;
}
locale = new Locale(config);
locale.parentLocale = locales[name];
locales[name] = locale;
}
// backwards compat for now: also set the locale
getSetGlobalLocale(name);
} else {
// pass null for config to unupdate, useful for tests
if (locales[name] != null) {
if (locales[name].parentLocale != null) {
locales[name] = locales[name].parentLocale;
if (name === getSetGlobalLocale()) {
getSetGlobalLocale(name);
}
} else if (locales[name] != null) {
delete locales[name];
}
}
}
return locales[name];
}
// returns locale data
function getLocale(key) {
var locale;
if (key && key._locale && key._locale._abbr) {
key = key._locale._abbr;
}
if (!key) {
return globalLocale;
}
if (!isArray(key)) {
//short-circuit everything else
locale = loadLocale(key);
if (locale) {
return locale;
}
key = [key];
}
return chooseLocale(key);
}
function listLocales() {
return keys(locales);
}
function checkOverflow(m) {
var overflow,
a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11
? MONTH
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
? DATE
: a[HOUR] < 0 ||
a[HOUR] > 24 ||
(a[HOUR] === 24 &&
(a[MINUTE] !== 0 ||
a[SECOND] !== 0 ||
a[MILLISECOND] !== 0))
? HOUR
: a[MINUTE] < 0 || a[MINUTE] > 59
? MINUTE
: a[SECOND] < 0 || a[SECOND] > 59
? SECOND
: a[MILLISECOND] < 0 || a[MILLISECOND] > 999
? MILLISECOND
: -1;
if (
getParsingFlags(m)._overflowDayOfYear &&
(overflow < YEAR || overflow > DATE)
) {
overflow = DATE;
}
if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
overflow = WEEK;
}
if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
overflow = WEEKDAY;
}
getParsingFlags(m).overflow = overflow;
}
return m;
}
// iso 8601 regex
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
isoDates = [
['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
['GGGG-[W]WW', /\d{4}-W\d\d/, false],
['YYYY-DDD', /\d{4}-\d{3}/],
['YYYY-MM', /\d{4}-\d\d/, false],
['YYYYYYMMDD', /[+-]\d{10}/],
['YYYYMMDD', /\d{8}/],
['GGGG[W]WWE', /\d{4}W\d{3}/],
['GGGG[W]WW', /\d{4}W\d{2}/, false],
['YYYYDDD', /\d{7}/],
['YYYYMM', /\d{6}/, false],
['YYYY', /\d{4}/, false],
],
// iso time formats and regexes
isoTimes = [
['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
['HH:mm:ss', /\d\d:\d\d:\d\d/],
['HH:mm', /\d\d:\d\d/],
['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
['HHmmss', /\d\d\d\d\d\d/],
['HHmm', /\d\d\d\d/],
['HH', /\d\d/],
],
aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
obsOffsets = {
UT: 0,
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60,
};
// date from iso format
function configFromISO(config) {
var i,
l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime,
dateFormat,
timeFormat,
tzFormat;
if (match) {
getParsingFlags(config).iso = true;
for (i = 0, l = isoDates.length; i < l; i++) {
if (isoDates[i][1].exec(match[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
break;
}
}
if (dateFormat == null) {
config._isValid = false;
return;
}
if (match[3]) {
for (i = 0, l = isoTimes.length; i < l; i++) {
if (isoTimes[i][1].exec(match[3])) {
// match[2] should be 'T' or space
timeFormat = (match[2] || ' ') + isoTimes[i][0];
break;
}
}
if (timeFormat == null) {
config._isValid = false;
return;
}
}
if (!allowTime && timeFormat != null) {
config._isValid = false;
return;
}
if (match[4]) {
if (tzRegex.exec(match[4])) {
tzFormat = 'Z';
} else {
config._isValid = false;
return;
}
}
config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
configFromStringAndFormat(config);
} else {
config._isValid = false;
}
}
function extractFromRFC2822Strings(
yearStr,
monthStr,
dayStr,
hourStr,
minuteStr,
secondStr
) {
var result = [
untruncateYear(yearStr),
defaultLocaleMonthsShort.indexOf(monthStr),
parseInt(dayStr, 10),
parseInt(hourStr, 10),
parseInt(minuteStr, 10),
];
if (secondStr) {
result.push(parseInt(secondStr, 10));
}
return result;
}
function untruncateYear(yearStr) {
var year = parseInt(yearStr, 10);
if (year <= 49) {
return 2000 + year;
} else if (year <= 999) {
return 1900 + year;
}
return year;
}
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^)]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
}
function checkWeekday(weekdayStr, parsedInput, config) {
if (weekdayStr) {
// TODO: Replace the vanilla JS Date object with an independent day-of-week check.
var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
weekdayActual = new Date(
parsedInput[0],
parsedInput[1],
parsedInput[2]
).getDay();
if (weekdayProvided !== weekdayActual) {
getParsingFlags(config).weekdayMismatch = true;
config._isValid = false;
return false;
}
}
return true;
}
function calculateOffset(obsOffset, militaryOffset, numOffset) {
if (obsOffset) {
return obsOffsets[obsOffset];
} else if (militaryOffset) {
// the only allowed military tz is Z
return 0;
} else {
var hm = parseInt(numOffset, 10),
m = hm % 100,
h = (hm - m) / 100;
return h * 60 + m;
}
}
// date and time from ref 2822 format
function configFromRFC2822(config) {
var match = rfc2822.exec(preprocessRFC2822(config._i)),
parsedArray;
if (match) {
parsedArray = extractFromRFC2822Strings(
match[4],
match[3],
match[2],
match[5],
match[6],
match[7]
);
if (!checkWeekday(match[1], parsedArray, config)) {
return;
}
config._a = parsedArray;
config._tzm = calculateOffset(match[8], match[9], match[10]);
config._d = createUTCDate.apply(null, config._a);
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
getParsingFlags(config).rfc2822 = true;
} else {
config._isValid = false;
}
}
// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
function configFromString(config) {
var matched = aspNetJsonRegex.exec(config._i);
if (matched !== null) {
config._d = new Date(+matched[1]);
return;
}
configFromISO(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
configFromRFC2822(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
if (config._strict) {
config._isValid = false;
} else {
// Final attempt, use Input Fallback
hooks.createFromInputFallback(config);
}
}
hooks.createFromInputFallback = deprecate(
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
}
);
// Pick the first defined of two or three arguments.
function defaults(a, b, c) {
if (a != null) {
return a;
}
if (b != null) {
return b;
}
return c;
}
function currentDateArray(config) {
// hooks is actually the exported moment object
var nowValue = new Date(hooks.now());
if (config._useUTC) {
return [
nowValue.getUTCFullYear(),
nowValue.getUTCMonth(),
nowValue.getUTCDate(),
];
}
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function configFromArray(config) {
var i,
date,
input = [],
currentDate,
expectedWeekday,
yearToUse;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
//compute day of the year from weeks and weekdays
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
dayOfYearFromWeekInfo(config);
}
//if the day of the year is set, figure out what it is
if (config._dayOfYear != null) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (
config._dayOfYear > daysInYear(yearToUse) ||
config._dayOfYear === 0
) {
getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] =
config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
}
// Check for 24:00:00.000
if (
config._a[HOUR] === 24 &&
config._a[MINUTE] === 0 &&
config._a[SECOND] === 0 &&
config._a[MILLISECOND] === 0
) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? createUTCDate : createDate).apply(
null,
input
);
expectedWeekday = config._useUTC
? config._d.getUTCDay()
: config._d.getDay();
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
// check for mismatching day of week
if (
config._w &&
typeof config._w.d !== 'undefined' &&
config._w.d !== expectedWeekday
) {
getParsingFlags(config).weekdayMismatch = true;
}
}
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
dow = 1;
doy = 4;
// TODO: We need to take the current isoWeekYear, but that depends on
// how we interpret now (local, utc, fixed offset). So create
// a now version of current config (take local/utc/offset flags, and
// create now).
weekYear = defaults(
w.GG,
config._a[YEAR],
weekOfYear(createLocal(), 1, 4).year
);
week = defaults(w.W, 1);
weekday = defaults(w.E, 1);
if (weekday < 1 || weekday > 7) {
weekdayOverflow = true;
}
} else {
dow = config._locale._week.dow;
doy = config._locale._week.doy;
curWeek = weekOfYear(createLocal(), dow, doy);
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
// Default to current week.
week = defaults(w.w, curWeek.week);
if (w.d != null) {
// weekday -- low day numbers are considered next week
weekday = w.d;
if (weekday < 0 || weekday > 6) {
weekdayOverflow = true;
}
} else if (w.e != null) {
// local weekday -- counting starts from beginning of week
weekday = w.e + dow;
if (w.e < 0 || w.e > 6) {
weekdayOverflow = true;
}
} else {
// default to beginning of week
weekday = dow;
}
}
if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
getParsingFlags(config)._overflowWeeks = true;
} else if (weekdayOverflow != null) {
getParsingFlags(config)._overflowWeekday = true;
} else {
temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
}
// constant that refers to the ISO standard
hooks.ISO_8601 = function () {};
// constant that refers to the RFC 2822 form
hooks.RFC_2822 = function () {};
// date from string and format string
function configFromStringAndFormat(config) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
}
if (config._f === hooks.RFC_2822) {
configFromRFC2822(config);
return;
}
config._a = [];
getParsingFlags(config).empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var string = '' + config._i,
i,
parsedInput,
tokens,
token,
skipped,
stringLength = string.length,
totalParsedInputLength = 0,
era;
tokens =
expandFormat(config._f, config._locale).match(formattingTokens) || [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) ||
[])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(
string.indexOf(parsedInput) + parsedInput.length
);
totalParsedInputLength += parsedInput.length;
}
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
getParsingFlags(config).empty = false;
} else {
getParsingFlags(config).unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
} else if (config._strict && !parsedInput) {
getParsingFlags(config).unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
getParsingFlags(config).charsLeftOver =
stringLength - totalParsedInputLength;
if (string.length > 0) {
getParsingFlags(config).unusedInput.push(string);
}
// clear _12h flag if hour is <= 12
if (
config._a[HOUR] <= 12 &&
getParsingFlags(config).bigHour === true &&
config._a[HOUR] > 0
) {
getParsingFlags(config).bigHour = undefined;
}
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
// handle meridiem
config._a[HOUR] = meridiemFixWrap(
config._locale,
config._a[HOUR],
config._meridiem
);
// handle era
era = getParsingFlags(config).era;
if (era !== null) {
config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
}
configFromArray(config);
checkOverflow(config);
}
function meridiemFixWrap(locale, hour, meridiem) {
var isPm;
if (meridiem == null) {
// nothing to do
return hour;
}
if (locale.meridiemHour != null) {
return locale.meridiemHour(hour, meridiem);
} else if (locale.isPM != null) {
// Fallback
isPm = locale.isPM(meridiem);
if (isPm && hour < 12) {
hour += 12;
}
if (!isPm && hour === 12) {
hour = 0;
}
return hour;
} else {
// this is not supposed to happen
return hour;
}
}
// date from string and array of format strings
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore,
validFormatFound,
bestFormatIsValid = false;
if (config._f.length === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < config._f.length; i++) {
currentScore = 0;
validFormatFound = false;
tempConfig = copyConfig({}, config);
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
if (isValid(tempConfig)) {
validFormatFound = true;
}
// if there is any input that was not parsed add a penalty for that format
currentScore += getParsingFlags(tempConfig).charsLeftOver;
//or tokens
currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
getParsingFlags(tempConfig).score = currentScore;
if (!bestFormatIsValid) {
if (
scoreToBeat == null ||
currentScore < scoreToBeat ||
validFormatFound
) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
if (validFormatFound) {
bestFormatIsValid = true;
}
}
} else {
if (currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
}
extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
if (config._d) {
return;
}
var i = normalizeObjectUnits(config._i),
dayOrDate = i.day === undefined ? i.date : i.day;
config._a = map(
[i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
function (obj) {
return obj && parseInt(obj, 10);
}
);
configFromArray(config);
}
function createFromConfig(config) {
var res = new Moment(checkOverflow(prepareConfig(config)));
if (res._nextDay) {
// Adding is smart enough around DST
res.add(1, 'd');
res._nextDay = undefined;
}
return res;
}
function prepareConfig(config) {
var input = config._i,
format = config._f;
config._locale = config._locale || getLocale(config._l);
if (input === null || (format === undefined && input === '')) {
return createInvalid({ nullInput: true });
}
if (typeof input === 'string') {
config._i = input = config._locale.preparse(input);
}
if (isMoment(input)) {
return new Moment(checkOverflow(input));
} else if (isDate(input)) {
config._d = input;
} else if (isArray(format)) {
configFromStringAndArray(config);
} else if (format) {
configFromStringAndFormat(config);
} else {
configFromInput(config);
}
if (!isValid(config)) {
config._d = null;
}
return config;
}
function configFromInput(config) {
var input = config._i;
if (isUndefined(input)) {
config._d = new Date(hooks.now());
} else if (isDate(input)) {
config._d = new Date(input.valueOf());
} else if (typeof input === 'string') {
configFromString(config);
} else if (isArray(input)) {
config._a = map(input.slice(0), function (obj) {
return parseInt(obj, 10);
});
configFromArray(config);
} else if (isObject(input)) {
configFromObject(config);
} else if (isNumber(input)) {
// from milliseconds
config._d = new Date(input);
} else {
hooks.createFromInputFallback(config);
}
}
function createLocalOrUTC(input, format, locale, strict, isUTC) {
var c = {};
if (format === true || format === false) {
strict = format;
format = undefined;
}
if (locale === true || locale === false) {
strict = locale;
locale = undefined;
}
if (
(isObject(input) && isObjectEmpty(input)) ||
(isArray(input) && input.length === 0)
) {
input = undefined;
}
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
c._isAMomentObject = true;
c._useUTC = c._isUTC = isUTC;
c._l = locale;
c._i = input;
c._f = format;
c._strict = strict;
return createFromConfig(c);
}
function createLocal(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, false);
}
var prototypeMin = deprecate(
'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other < this ? this : other;
} else {
return createInvalid();
}
}
),
prototypeMax = deprecate(
'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other > this ? this : other;
} else {
return createInvalid();
}
}
);
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function pickBy(fn, moments) {
var res, i;
if (moments.length === 1 && isArray(moments[0])) {
moments = moments[0];
}
if (!moments.length) {
return createLocal();
}
res = moments[0];
for (i = 1; i < moments.length; ++i) {
if (!moments[i].isValid() || moments[i][fn](res)) {
res = moments[i];
}
}
return res;
}
// TODO: Use [].sort instead?
function min() {
var args = [].slice.call(arguments, 0);
return pickBy('isBefore', args);
}
function max() {
var args = [].slice.call(arguments, 0);
return pickBy('isAfter', args);
}
var now = function () {
return Date.now ? Date.now() : +new Date();
};
var ordering = [
'year',
'quarter',
'month',
'week',
'day',
'hour',
'minute',
'second',
'millisecond',
];
function isDurationValid(m) {
var key,
unitHasDecimal = false,
i;
for (key in m) {
if (
hasOwnProp(m, key) &&
!(
indexOf.call(ordering, key) !== -1 &&
(m[key] == null || !isNaN(m[key]))
)
) {
return false;
}
}
for (i = 0; i < ordering.length; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false; // only allow non-integers for smallest unit
}
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
unitHasDecimal = true;
}
}
}
return true;
}
function isValid$1() {
return this._isValid;
}
function createInvalid$1() {
return createDuration(NaN);
}
function Duration(duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
quarters = normalizedInput.quarter || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
this._isValid = isDurationValid(normalizedInput);
// representation for dateAddRemove
this._milliseconds =
+milliseconds +
seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60
hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +days + weeks * 7;
// It is impossible to translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +months + quarters * 3 + years * 12;
this._data = {};
this._locale = getLocale();
this._bubble();
}
function isDuration(obj) {
return obj instanceof Duration;
}
function absRound(number) {
if (number < 0) {
return Math.round(-1 * number) * -1;
} else {
return Math.round(number);
}
}
// compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if (
(dontConvert && array1[i] !== array2[i]) ||
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
) {
diffs++;
}
}
return diffs + lengthDiff;
}
// FORMATTING
function offset(token, separator) {
addFormatToken(token, 0, 0, function () {
var offset = this.utcOffset(),
sign = '+';
if (offset < 0) {
offset = -offset;
sign = '-';
}
return (
sign +
zeroFill(~~(offset / 60), 2) +
separator +
zeroFill(~~offset % 60, 2)
);
});
}
offset('Z', ':');
offset('ZZ', '');
// PARSING
addRegexToken('Z', matchShortOffset);
addRegexToken('ZZ', matchShortOffset);
addParseToken(['Z', 'ZZ'], function (input, array, config) {
config._useUTC = true;
config._tzm = offsetFromString(matchShortOffset, input);
});
// HELPERS
// timezone chunker
// '+10:00' > ['10', '00']
// '-1530' > ['-15', '30']
var chunkOffset = /([\+\-]|\d\d)/gi;
function offsetFromString(matcher, string) {
var matches = (string || '').match(matcher),
chunk,
parts,
minutes;
if (matches === null) {
return null;
}
chunk = matches[matches.length - 1] || [];
parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
minutes = +(parts[1] * 60) + toInt(parts[2]);
return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
}
// Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) {
var res, diff;
if (model._isUTC) {
res = model.clone();
diff =
(isMoment(input) || isDate(input)
? input.valueOf()
: createLocal(input).valueOf()) - res.valueOf();
// Use low-level api, because this fn is low-level api.
res._d.setTime(res._d.valueOf() + diff);
hooks.updateOffset(res, false);
return res;
} else {
return createLocal(input).local();
}
}
function getDateOffset(m) {
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
// https://github.com/moment/moment/pull/1871
return -Math.round(m._d.getTimezoneOffset());
}
// HOOKS
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
hooks.updateOffset = function () {};
// MOMENTS
// keepLocalTime = true means only change the timezone, without
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
// +0200, so we adjust the time as needed, to be valid.
//
// Keeping the time actually adds/subtracts (one hour)
// from the actual represented time. That is why we call updateOffset
// a second time. In case it wants us to change the offset again
// _changeInProgress == true case, then we have to adjust, because
// there is no such time in the given timezone.
function getSetOffset(input, keepLocalTime, keepMinutes) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
if (typeof input === 'string') {
input = offsetFromString(matchShortOffset, input);
if (input === null) {
return this;
}
} else if (Math.abs(input) < 16 && !keepMinutes) {
input = input * 60;
}
if (!this._isUTC && keepLocalTime) {
localAdjust = getDateOffset(this);
}
this._offset = input;
this._isUTC = true;
if (localAdjust != null) {
this.add(localAdjust, 'm');
}
if (offset !== input) {
if (!keepLocalTime || this._changeInProgress) {
addSubtract(
this,
createDuration(input - offset, 'm'),
1,
false
);
} else if (!this._changeInProgress) {
this._changeInProgress = true;
hooks.updateOffset(this, true);
this._changeInProgress = null;
}
}
return this;
} else {
return this._isUTC ? offset : getDateOffset(this);
}
}
function getSetZone(input, keepLocalTime) {
if (input != null) {
if (typeof input !== 'string') {
input = -input;
}
this.utcOffset(input, keepLocalTime);
return this;
} else {
return -this.utcOffset();
}
}
function setOffsetToUTC(keepLocalTime) {
return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal(keepLocalTime) {
if (this._isUTC) {
this.utcOffset(0, keepLocalTime);
this._isUTC = false;
if (keepLocalTime) {
this.subtract(getDateOffset(this), 'm');
}
}
return this;
}
function setOffsetToParsedOffset() {
if (this._tzm != null) {
this.utcOffset(this._tzm, false, true);
} else if (typeof this._i === 'string') {
var tZone = offsetFromString(matchOffset, this._i);
if (tZone != null) {
this.utcOffset(tZone);
} else {
this.utcOffset(0, true);
}
}
return this;
}
function hasAlignedHourOffset(input) {
if (!this.isValid()) {
return false;
}
input = input ? createLocal(input).utcOffset() : 0;
return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime() {
return (
this.utcOffset() > this.clone().month(0).utcOffset() ||
this.utcOffset() > this.clone().month(5).utcOffset()
);
}
function isDaylightSavingTimeShifted() {
if (!isUndefined(this._isDSTShifted)) {
return this._isDSTShifted;
}
var c = {},
other;
copyConfig(c, this);
c = prepareConfig(c);
if (c._a) {
other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
this._isDSTShifted =
this.isValid() && compareArrays(c._a, other.toArray()) > 0;
} else {
this._isDSTShifted = false;
}
return this._isDSTShifted;
}
function isLocal() {
return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset() {
return this.isValid() ? this._isUTC : false;
}
function isUtc() {
return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
// ASP.NET json date format regex
var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
// and further modified to allow for strings containing both week and day
isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration(input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
ret,
diffRes;
if (isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months,
};
} else if (isNumber(input) || !isNaN(+input)) {
duration = {};
if (key) {
duration[key] = +input;
} else {
duration.milliseconds = +input;
}
} else if ((match = aspNetRegex.exec(input))) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: 0,
d: toInt(match[DATE]) * sign,
h: toInt(match[HOUR]) * sign,
m: toInt(match[MINUTE]) * sign,
s: toInt(match[SECOND]) * sign,
ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
};
} else if ((match = isoRegex.exec(input))) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: parseIso(match[2], sign),
M: parseIso(match[3], sign),
w: parseIso(match[4], sign),
d: parseIso(match[5], sign),
h: parseIso(match[6], sign),
m: parseIso(match[7], sign),
s: parseIso(match[8], sign),
};
} else if (duration == null) {
// checks for null or undefined
duration = {};
} else if (
typeof duration === 'object' &&
('from' in duration || 'to' in duration)
) {
diffRes = momentsDifference(
createLocal(duration.from),
createLocal(duration.to)
);
duration = {};
duration.ms = diffRes.milliseconds;
duration.M = diffRes.months;
}
ret = new Duration(duration);
if (isDuration(input) && hasOwnProp(input, '_locale')) {
ret._locale = input._locale;
}
if (isDuration(input) && hasOwnProp(input, '_isValid')) {
ret._isValid = input._isValid;
}
return ret;
}
createDuration.fn = Duration.prototype;
createDuration.invalid = createInvalid$1;
function parseIso(inp, sign) {
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var res = inp && parseFloat(inp.replace(',', '.'));
// apply sign while we're at it
return (isNaN(res) ? 0 : res) * sign;
}
function positiveMomentsDifference(base, other) {
var res = {};
res.months =
other.month() - base.month() + (other.year() - base.year()) * 12;
if (base.clone().add(res.months, 'M').isAfter(other)) {
--res.months;
}
res.milliseconds = +other - +base.clone().add(res.months, 'M');
return res;
}
function momentsDifference(base, other) {
var res;
if (!(base.isValid() && other.isValid())) {
return { milliseconds: 0, months: 0 };
}
other = cloneWithOffset(other, base);
if (base.isBefore(other)) {
res = positiveMomentsDifference(base, other);
} else {
res = positiveMomentsDifference(other, base);
res.milliseconds = -res.milliseconds;
res.months = -res.months;
}
return res;
}
// TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) {
return function (val, period) {
var dur, tmp;
//invert the arguments, but complain about it
if (period !== null && !isNaN(+period)) {
deprecateSimple(
name,
'moment().' +
name +
'(period, number) is deprecated. Please use moment().' +
name +
'(number, period). ' +
'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
);
tmp = val;
val = period;
period = tmp;
}
dur = createDuration(val, period);
addSubtract(this, dur, direction);
return this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
var milliseconds = duration._milliseconds,
days = absRound(duration._days),
months = absRound(duration._months);
if (!mom.isValid()) {
// No op
return;
}
updateOffset = updateOffset == null ? true : updateOffset;
if (months) {
setMonth(mom, get(mom, 'Month') + months * isAdding);
}
if (days) {
set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
}
if (milliseconds) {
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
}
if (updateOffset) {
hooks.updateOffset(mom, days || months);
}
}
var add = createAdder(1, 'add'),
subtract = createAdder(-1, 'subtract');
function isString(input) {
return typeof input === 'string' || input instanceof String;
}
// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
function isMomentInput(input) {
return (
isMoment(input) ||
isDate(input) ||
isString(input) ||
isNumber(input) ||
isNumberOrStringArray(input) ||
isMomentInputObject(input) ||
input === null ||
input === undefined
);
}
function isMomentInputObject(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = [
'years',
'year',
'y',
'months',
'month',
'M',
'days',
'day',
'd',
'dates',
'date',
'D',
'hours',
'hour',
'h',
'minutes',
'minute',
'm',
'seconds',
'second',
's',
'milliseconds',
'millisecond',
'ms',
],
i,
property;
for (i = 0; i < properties.length; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function isNumberOrStringArray(input) {
var arrayTest = isArray(input),
dataTypeTest = false;
if (arrayTest) {
dataTypeTest =
input.filter(function (item) {
return !isNumber(item) && isString(input);
}).length === 0;
}
return arrayTest && dataTypeTest;
}
function isCalendarSpec(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = [
'sameDay',
'nextDay',
'lastDay',
'nextWeek',
'lastWeek',
'sameElse',
],
i,
property;
for (i = 0; i < properties.length; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function getCalendarFormat(myMoment, now) {
var diff = myMoment.diff(now, 'days', true);
return diff < -6
? 'sameElse'
: diff < -1
? 'lastWeek'
: diff < 0
? 'lastDay'
: diff < 1
? 'sameDay'
: diff < 2
? 'nextDay'
: diff < 7
? 'nextWeek'
: 'sameElse';
}
function calendar$1(time, formats) {
// Support for single parameter, formats only overload to the calendar function
if (arguments.length === 1) {
if (!arguments[0]) {
time = undefined;
formats = undefined;
} else if (isMomentInput(arguments[0])) {
time = arguments[0];
formats = undefined;
} else if (isCalendarSpec(arguments[0])) {
formats = arguments[0];
time = undefined;
}
}
// We want to compare the start of today, vs this.
// Getting start-of-today depends on whether we're local/utc/offset or not.
var now = time || createLocal(),
sod = cloneWithOffset(now, this).startOf('day'),
format = hooks.calendarFormat(this, sod) || 'sameElse',
output =
formats &&
(isFunction(formats[format])
? formats[format].call(this, now)
: formats[format]);
return this.format(
output || this.localeData().calendar(format, this, createLocal(now))
);
}
function clone() {
return new Moment(this);
}
function isAfter(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() > localInput.valueOf();
} else {
return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
}
function isBefore(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() < localInput.valueOf();
} else {
return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
}
function isBetween(from, to, units, inclusivity) {
var localFrom = isMoment(from) ? from : createLocal(from),
localTo = isMoment(to) ? to : createLocal(to);
if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
return false;
}
inclusivity = inclusivity || '()';
return (
(inclusivity[0] === '('
? this.isAfter(localFrom, units)
: !this.isBefore(localFrom, units)) &&
(inclusivity[1] === ')'
? this.isBefore(localTo, units)
: !this.isAfter(localTo, units))
);
}
function isSame(input, units) {
var localInput = isMoment(input) ? input : createLocal(input),
inputMs;
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() === localInput.valueOf();
} else {
inputMs = localInput.valueOf();
return (
this.clone().startOf(units).valueOf() <= inputMs &&
inputMs <= this.clone().endOf(units).valueOf()
);
}
}
function isSameOrAfter(input, units) {
return this.isSame(input, units) || this.isAfter(input, units);
}
function isSameOrBefore(input, units) {
return this.isSame(input, units) || this.isBefore(input, units);
}
function diff(input, units, asFloat) {
var that, zoneDelta, output;
if (!this.isValid()) {
return NaN;
}
that = cloneWithOffset(input, this);
if (!that.isValid()) {
return NaN;
}
zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
units = normalizeUnits(units);
switch (units) {
case 'year':
output = monthDiff(this, that) / 12;
break;
case 'month':
output = monthDiff(this, that);
break;
case 'quarter':
output = monthDiff(this, that) / 3;
break;
case 'second':
output = (this - that) / 1e3;
break; // 1000
case 'minute':
output = (this - that) / 6e4;
break; // 1000 * 60
case 'hour':
output = (this - that) / 36e5;
break; // 1000 * 60 * 60
case 'day':
output = (this - that - zoneDelta) / 864e5;
break; // 1000 * 60 * 60 * 24, negate dst
case 'week':
output = (this - that - zoneDelta) / 6048e5;
break; // 1000 * 60 * 60 * 24 * 7, negate dst
default:
output = this - that;
}
return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
if (a.date() < b.date()) {
// end-of-month calculations work correct when the start month has more
// days than the end month.
return -monthDiff(b, a);
}
// difference in months
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
// b is in (anchor - 1 month, anchor + 1 month)
anchor = a.clone().add(wholeMonthDiff, 'months'),
anchor2,
adjust;
if (b - anchor < 0) {
anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor - anchor2);
} else {
anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor2 - anchor);
}
//check for negative zero, return zero if negative zero
return -(wholeMonthDiff + adjust) || 0;
}
hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
function toString() {
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
}
function toISOString(keepOffset) {
if (!this.isValid()) {
return null;
}
var utc = keepOffset !== true,
m = utc ? this.clone().utc() : this;
if (m.year() < 0 || m.year() > 9999) {
return formatMoment(
m,
utc
? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
: 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
);
}
if (isFunction(Date.prototype.toISOString)) {
// native implementation is ~50x faster, use it when we can
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
.toISOString()
.replace('Z', formatMoment(m, 'Z'));
}
}
return formatMoment(
m,
utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
);
}
/**
* Return a human readable representation of a moment that can
* also be evaluated to get a new moment which is the same
*
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
*/
function inspect() {
if (!this.isValid()) {
return 'moment.invalid(/* ' + this._i + ' */)';
}
var func = 'moment',
zone = '',
prefix,
year,
datetime,
suffix;
if (!this.isLocal()) {
func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
zone = 'Z';
}
prefix = '[' + func + '("]';
year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
datetime = '-MM-DD[T]HH:mm:ss.SSS';
suffix = zone + '[")]';
return this.format(prefix + year + datetime + suffix);
}
function format(inputString) {
if (!inputString) {
inputString = this.isUtc()
? hooks.defaultFormatUtc
: hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output);
}
function from(time, withoutSuffix) {
if (
this.isValid() &&
((isMoment(time) && time.isValid()) || createLocal(time).isValid())
) {
return createDuration({ to: this, from: time })
.locale(this.locale())
.humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function fromNow(withoutSuffix) {
return this.from(createLocal(), withoutSuffix);
}
function to(time, withoutSuffix) {
if (
this.isValid() &&
((isMoment(time) && time.isValid()) || createLocal(time).isValid())
) {
return createDuration({ from: this, to: time })
.locale(this.locale())
.humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function toNow(withoutSuffix) {
return this.to(createLocal(), withoutSuffix);
}
// If passed a locale key, it will set the locale for this
// instance. Otherwise, it will return the locale configuration
// variables for this instance.
function locale(key) {
var newLocaleData;
if (key === undefined) {
return this._locale._abbr;
} else {
newLocaleData = getLocale(key);
if (newLocaleData != null) {
this._locale = newLocaleData;
}
return this;
}
}
var lang = deprecate(
'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
function (key) {
if (key === undefined) {
return this.localeData();
} else {
return this.locale(key);
}
}
);
function localeData() {
return this._locale;
}
var MS_PER_SECOND = 1000,
MS_PER_MINUTE = 60 * MS_PER_SECOND,
MS_PER_HOUR = 60 * MS_PER_MINUTE,
MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
// actual modulo - handles negative numbers (for dates before 1970):
function mod$1(dividend, divisor) {
return ((dividend % divisor) + divisor) % divisor;
}
function localStartOfDate(y, m, d) {
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
return new Date(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return new Date(y, m, d).valueOf();
}
}
function utcStartOfDate(y, m, d) {
// Date.UTC remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return Date.UTC(y, m, d);
}
}
function startOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year(), 0, 1);
break;
case 'quarter':
time = startOfDate(
this.year(),
this.month() - (this.month() % 3),
1
);
break;
case 'month':
time = startOfDate(this.year(), this.month(), 1);
break;
case 'week':
time = startOfDate(
this.year(),
this.month(),
this.date() - this.weekday()
);
break;
case 'isoWeek':
time = startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1)
);
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date());
break;
case 'hour':
time = this._d.valueOf();
time -= mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
);
break;
case 'minute':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_MINUTE);
break;
case 'second':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_SECOND);
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function endOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year() + 1, 0, 1) - 1;
break;
case 'quarter':
time =
startOfDate(
this.year(),
this.month() - (this.month() % 3) + 3,
1
) - 1;
break;
case 'month':
time = startOfDate(this.year(), this.month() + 1, 1) - 1;
break;
case 'week':
time =
startOfDate(
this.year(),
this.month(),
this.date() - this.weekday() + 7
) - 1;
break;
case 'isoWeek':
time =
startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1) + 7
) - 1;
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
break;
case 'hour':
time = this._d.valueOf();
time +=
MS_PER_HOUR -
mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
) -
1;
break;
case 'minute':
time = this._d.valueOf();
time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
break;
case 'second':
time = this._d.valueOf();
time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function valueOf() {
return this._d.valueOf() - (this._offset || 0) * 60000;
}
function unix() {
return Math.floor(this.valueOf() / 1000);
}
function toDate() {
return new Date(this.valueOf());
}
function toArray() {
var m = this;
return [
m.year(),
m.month(),
m.date(),
m.hour(),
m.minute(),
m.second(),
m.millisecond(),
];
}
function toObject() {
var m = this;
return {
years: m.year(),
months: m.month(),
date: m.date(),
hours: m.hours(),
minutes: m.minutes(),
seconds: m.seconds(),
milliseconds: m.milliseconds(),
};
}
function toJSON() {
// new Date(NaN).toJSON() === null
return this.isValid() ? this.toISOString() : null;
}
function isValid$2() {
return isValid(this);
}
function parsingFlags() {
return extend({}, getParsingFlags(this));
}
function invalidAt() {
return getParsingFlags(this).overflow;
}
function creationData() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict,
};
}
addFormatToken('N', 0, 0, 'eraAbbr');
addFormatToken('NN', 0, 0, 'eraAbbr');
addFormatToken('NNN', 0, 0, 'eraAbbr');
addFormatToken('NNNN', 0, 0, 'eraName');
addFormatToken('NNNNN', 0, 0, 'eraNarrow');
addFormatToken('y', ['y', 1], 'yo', 'eraYear');
addFormatToken('y', ['yy', 2], 0, 'eraYear');
addFormatToken('y', ['yyy', 3], 0, 'eraYear');
addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
addRegexToken('N', matchEraAbbr);
addRegexToken('NN', matchEraAbbr);
addRegexToken('NNN', matchEraAbbr);
addRegexToken('NNNN', matchEraName);
addRegexToken('NNNNN', matchEraNarrow);
addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
input,
array,
config,
token
) {
var era = config._locale.erasParse(input, token, config._strict);
if (era) {
getParsingFlags(config).era = era;
} else {
getParsingFlags(config).invalidEra = input;
}
});
addRegexToken('y', matchUnsigned);
addRegexToken('yy', matchUnsigned);
addRegexToken('yyy', matchUnsigned);
addRegexToken('yyyy', matchUnsigned);
addRegexToken('yo', matchEraYearOrdinal);
addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
addParseToken(['yo'], function (input, array, config, token) {
var match;
if (config._locale._eraYearOrdinalRegex) {
match = input.match(config._locale._eraYearOrdinalRegex);
}
if (config._locale.eraYearOrdinalParse) {
array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
} else {
array[YEAR] = parseInt(input, 10);
}
});
function localeEras(m, format) {
var i,
l,
date,
eras = this._eras || getLocale('en')._eras;
for (i = 0, l = eras.length; i < l; ++i) {
switch (typeof eras[i].since) {
case 'string':
// truncate time
date = hooks(eras[i].since).startOf('day');
eras[i].since = date.valueOf();
break;
}
switch (typeof eras[i].until) {
case 'undefined':
eras[i].until = +Infinity;
break;
case 'string':
// truncate time
date = hooks(eras[i].until).startOf('day').valueOf();
eras[i].until = date.valueOf();
break;
}
}
return eras;
}
function localeErasParse(eraName, format, strict) {
var i,
l,
eras = this.eras(),
name,
abbr,
narrow;
eraName = eraName.toUpperCase();
for (i = 0, l = eras.length; i < l; ++i) {
name = eras[i].name.toUpperCase();
abbr = eras[i].abbr.toUpperCase();
narrow = eras[i].narrow.toUpperCase();
if (strict) {
switch (format) {
case 'N':
case 'NN':
case 'NNN':
if (abbr === eraName) {
return eras[i];
}
break;
case 'NNNN':
if (name === eraName) {
return eras[i];
}
break;
case 'NNNNN':
if (narrow === eraName) {
return eras[i];
}
break;
}
} else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
return eras[i];
}
}
}
function localeErasConvertYear(era, year) {
var dir = era.since <= era.until ? +1 : -1;
if (year === undefined) {
return hooks(era.since).year();
} else {
return hooks(era.since).year() + (year - era.offset) * dir;
}
}
function getEraName() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].name;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].name;
}
}
return '';
}
function getEraNarrow() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].narrow;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].narrow;
}
}
return '';
}
function getEraAbbr() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].abbr;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].abbr;
}
}
return '';
}
function getEraYear() {
var i,
l,
dir,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
dir = eras[i].since <= eras[i].until ? +1 : -1;
// truncate time
val = this.clone().startOf('day').valueOf();
if (
(eras[i].since <= val && val <= eras[i].until) ||
(eras[i].until <= val && val <= eras[i].since)
) {
return (
(this.year() - hooks(eras[i].since).year()) * dir +
eras[i].offset
);
}
}
return this.year();
}
function erasNameRegex(isStrict) {
if (!hasOwnProp(this, '_erasNameRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNameRegex : this._erasRegex;
}
function erasAbbrRegex(isStrict) {
if (!hasOwnProp(this, '_erasAbbrRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasAbbrRegex : this._erasRegex;
}
function erasNarrowRegex(isStrict) {
if (!hasOwnProp(this, '_erasNarrowRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNarrowRegex : this._erasRegex;
}
function matchEraAbbr(isStrict, locale) {
return locale.erasAbbrRegex(isStrict);
}
function matchEraName(isStrict, locale) {
return locale.erasNameRegex(isStrict);
}
function matchEraNarrow(isStrict, locale) {
return locale.erasNarrowRegex(isStrict);
}
function matchEraYearOrdinal(isStrict, locale) {
return locale._eraYearOrdinalRegex || matchUnsigned;
}
function computeErasParse() {
var abbrPieces = [],
namePieces = [],
narrowPieces = [],
mixedPieces = [],
i,
l,
eras = this.eras();
for (i = 0, l = eras.length; i < l; ++i) {
namePieces.push(regexEscape(eras[i].name));
abbrPieces.push(regexEscape(eras[i].abbr));
narrowPieces.push(regexEscape(eras[i].narrow));
mixedPieces.push(regexEscape(eras[i].name));
mixedPieces.push(regexEscape(eras[i].abbr));
mixedPieces.push(regexEscape(eras[i].narrow));
}
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
this._erasNarrowRegex = new RegExp(
'^(' + narrowPieces.join('|') + ')',
'i'
);
}
// FORMATTING
addFormatToken(0, ['gg', 2], 0, function () {
return this.weekYear() % 100;
});
addFormatToken(0, ['GG', 2], 0, function () {
return this.isoWeekYear() % 100;
});
function addWeekYearFormatToken(token, getter) {
addFormatToken(0, [token, token.length], 0, getter);
}
addWeekYearFormatToken('gggg', 'weekYear');
addWeekYearFormatToken('ggggg', 'weekYear');
addWeekYearFormatToken('GGGG', 'isoWeekYear');
addWeekYearFormatToken('GGGGG', 'isoWeekYear');
// ALIASES
addUnitAlias('weekYear', 'gg');
addUnitAlias('isoWeekYear', 'GG');
// PRIORITY
addUnitPriority('weekYear', 1);
addUnitPriority('isoWeekYear', 1);
// PARSING
addRegexToken('G', matchSigned);
addRegexToken('g', matchSigned);
addRegexToken('GG', match1to2, match2);
addRegexToken('gg', match1to2, match2);
addRegexToken('GGGG', match1to4, match4);
addRegexToken('gggg', match1to4, match4);
addRegexToken('GGGGG', match1to6, match6);
addRegexToken('ggggg', match1to6, match6);
addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
input,
week,
config,
token
) {
week[token.substr(0, 2)] = toInt(input);
});
addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
week[token] = hooks.parseTwoDigitYear(input);
});
// MOMENTS
function getSetWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.week(),
this.weekday(),
this.localeData()._week.dow,
this.localeData()._week.doy
);
}
function getSetISOWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.isoWeek(),
this.isoWeekday(),
1,
4
);
}
function getISOWeeksInYear() {
return weeksInYear(this.year(), 1, 4);
}
function getISOWeeksInISOWeekYear() {
return weeksInYear(this.isoWeekYear(), 1, 4);
}
function getWeeksInYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getWeeksInWeekYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
var weeksTarget;
if (input == null) {
return weekOfYear(this, dow, doy).year;
} else {
weeksTarget = weeksInYear(input, dow, doy);
if (week > weeksTarget) {
week = weeksTarget;
}
return setWeekAll.call(this, input, week, weekday, dow, doy);
}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
this.year(date.getUTCFullYear());
this.month(date.getUTCMonth());
this.date(date.getUTCDate());
return this;
}
// FORMATTING
addFormatToken('Q', 0, 'Qo', 'quarter');
// ALIASES
addUnitAlias('quarter', 'Q');
// PRIORITY
addUnitPriority('quarter', 7);
// PARSING
addRegexToken('Q', match1);
addParseToken('Q', function (input, array) {
array[MONTH] = (toInt(input) - 1) * 3;
});
// MOMENTS
function getSetQuarter(input) {
return input == null
? Math.ceil((this.month() + 1) / 3)
: this.month((input - 1) * 3 + (this.month() % 3));
}
// FORMATTING
addFormatToken('D', ['DD', 2], 'Do', 'date');
// ALIASES
addUnitAlias('date', 'D');
// PRIORITY
addUnitPriority('date', 9);
// PARSING
addRegexToken('D', match1to2);
addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) {
// TODO: Remove "ordinalParse" fallback in next major release.
return isStrict
? locale._dayOfMonthOrdinalParse || locale._ordinalParse
: locale._dayOfMonthOrdinalParseLenient;
});
addParseToken(['D', 'DD'], DATE);
addParseToken('Do', function (input, array) {
array[DATE] = toInt(input.match(match1to2)[0]);
});
// MOMENTS
var getSetDayOfMonth = makeGetSet('Date', true);
// FORMATTING
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
// ALIASES
addUnitAlias('dayOfYear', 'DDD');
// PRIORITY
addUnitPriority('dayOfYear', 4);
// PARSING
addRegexToken('DDD', match1to3);
addRegexToken('DDDD', match3);
addParseToken(['DDD', 'DDDD'], function (input, array, config) {
config._dayOfYear = toInt(input);
});
// HELPERS
// MOMENTS
function getSetDayOfYear(input) {
var dayOfYear =
Math.round(
(this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
) + 1;
return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
}
// FORMATTING
addFormatToken('m', ['mm', 2], 0, 'minute');
// ALIASES
addUnitAlias('minute', 'm');
// PRIORITY
addUnitPriority('minute', 14);
// PARSING
addRegexToken('m', match1to2);
addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE);
// MOMENTS
var getSetMinute = makeGetSet('Minutes', false);
// FORMATTING
addFormatToken('s', ['ss', 2], 0, 'second');
// ALIASES
addUnitAlias('second', 's');
// PRIORITY
addUnitPriority('second', 15);
// PARSING
addRegexToken('s', match1to2);
addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND);
// MOMENTS
var getSetSecond = makeGetSet('Seconds', false);
// FORMATTING
addFormatToken('S', 0, 0, function () {
return ~~(this.millisecond() / 100);
});
addFormatToken(0, ['SS', 2], 0, function () {
return ~~(this.millisecond() / 10);
});
addFormatToken(0, ['SSS', 3], 0, 'millisecond');
addFormatToken(0, ['SSSS', 4], 0, function () {
return this.millisecond() * 10;
});
addFormatToken(0, ['SSSSS', 5], 0, function () {
return this.millisecond() * 100;
});
addFormatToken(0, ['SSSSSS', 6], 0, function () {
return this.millisecond() * 1000;
});
addFormatToken(0, ['SSSSSSS', 7], 0, function () {
return this.millisecond() * 10000;
});
addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
return this.millisecond() * 100000;
});
addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
return this.millisecond() * 1000000;
});
// ALIASES
addUnitAlias('millisecond', 'ms');
// PRIORITY
addUnitPriority('millisecond', 16);
// PARSING
addRegexToken('S', match1to3, match1);
addRegexToken('SS', match1to3, match2);
addRegexToken('SSS', match1to3, match3);
var token, getSetMillisecond;
for (token = 'SSSS'; token.length <= 9; token += 'S') {
addRegexToken(token, matchUnsigned);
}
function parseMs(input, array) {
array[MILLISECOND] = toInt(('0.' + input) * 1000);
}
for (token = 'S'; token.length <= 9; token += 'S') {
addParseToken(token, parseMs);
}
getSetMillisecond = makeGetSet('Milliseconds', false);
// FORMATTING
addFormatToken('z', 0, 0, 'zoneAbbr');
addFormatToken('zz', 0, 0, 'zoneName');
// MOMENTS
function getZoneAbbr() {
return this._isUTC ? 'UTC' : '';
}
function getZoneName() {
return this._isUTC ? 'Coordinated Universal Time' : '';
}
var proto = Moment.prototype;
proto.add = add;
proto.calendar = calendar$1;
proto.clone = clone;
proto.diff = diff;
proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
proto.to = to;
proto.toNow = toNow;
proto.get = stringGet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
proto.isBefore = isBefore;
proto.isBetween = isBetween;
proto.isSame = isSame;
proto.isSameOrAfter = isSameOrAfter;
proto.isSameOrBefore = isSameOrBefore;
proto.isValid = isValid$2;
proto.lang = lang;
proto.locale = locale;
proto.localeData = localeData;
proto.max = prototypeMax;
proto.min = prototypeMin;
proto.parsingFlags = parsingFlags;
proto.set = stringSet;
proto.startOf = startOf;
proto.subtract = subtract;
proto.toArray = toArray;
proto.toObject = toObject;
proto.toDate = toDate;
proto.toISOString = toISOString;
proto.inspect = inspect;
if (typeof Symbol !== 'undefined' && Symbol.for != null) {
proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
return 'Moment<' + this.format() + '>';
};
}
proto.toJSON = toJSON;
proto.toString = toString;
proto.unix = unix;
proto.valueOf = valueOf;
proto.creationData = creationData;
proto.eraName = getEraName;
proto.eraNarrow = getEraNarrow;
proto.eraAbbr = getEraAbbr;
proto.eraYear = getEraYear;
proto.year = getSetYear;
proto.isLeapYear = getIsLeapYear;
proto.weekYear = getSetWeekYear;
proto.isoWeekYear = getSetISOWeekYear;
proto.quarter = proto.quarters = getSetQuarter;
proto.month = getSetMonth;
proto.daysInMonth = getDaysInMonth;
proto.week = proto.weeks = getSetWeek;
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
proto.weeksInYear = getWeeksInYear;
proto.weeksInWeekYear = getWeeksInWeekYear;
proto.isoWeeksInYear = getISOWeeksInYear;
proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
proto.date = getSetDayOfMonth;
proto.day = proto.days = getSetDayOfWeek;
proto.weekday = getSetLocaleDayOfWeek;
proto.isoWeekday = getSetISODayOfWeek;
proto.dayOfYear = getSetDayOfYear;
proto.hour = proto.hours = getSetHour;
proto.minute = proto.minutes = getSetMinute;
proto.second = proto.seconds = getSetSecond;
proto.millisecond = proto.milliseconds = getSetMillisecond;
proto.utcOffset = getSetOffset;
proto.utc = setOffsetToUTC;
proto.local = setOffsetToLocal;
proto.parseZone = setOffsetToParsedOffset;
proto.hasAlignedHourOffset = hasAlignedHourOffset;
proto.isDST = isDaylightSavingTime;
proto.isLocal = isLocal;
proto.isUtcOffset = isUtcOffset;
proto.isUtc = isUtc;
proto.isUTC = isUtc;
proto.zoneAbbr = getZoneAbbr;
proto.zoneName = getZoneName;
proto.dates = deprecate(
'dates accessor is deprecated. Use date instead.',
getSetDayOfMonth
);
proto.months = deprecate(
'months accessor is deprecated. Use month instead',
getSetMonth
);
proto.years = deprecate(
'years accessor is deprecated. Use year instead',
getSetYear
);
proto.zone = deprecate(
'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
getSetZone
);
proto.isDSTShifted = deprecate(
'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
isDaylightSavingTimeShifted
);
function createUnix(input) {
return createLocal(input * 1000);
}
function createInZone() {
return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat(string) {
return string;
}
var proto$1 = Locale.prototype;
proto$1.calendar = calendar;
proto$1.longDateFormat = longDateFormat;
proto$1.invalidDate = invalidDate;
proto$1.ordinal = ordinal;
proto$1.preparse = preParsePostFormat;
proto$1.postformat = preParsePostFormat;
proto$1.relativeTime = relativeTime;
proto$1.pastFuture = pastFuture;
proto$1.set = set;
proto$1.eras = localeEras;
proto$1.erasParse = localeErasParse;
proto$1.erasConvertYear = localeErasConvertYear;
proto$1.erasAbbrRegex = erasAbbrRegex;
proto$1.erasNameRegex = erasNameRegex;
proto$1.erasNarrowRegex = erasNarrowRegex;
proto$1.months = localeMonths;
proto$1.monthsShort = localeMonthsShort;
proto$1.monthsParse = localeMonthsParse;
proto$1.monthsRegex = monthsRegex;
proto$1.monthsShortRegex = monthsShortRegex;
proto$1.week = localeWeek;
proto$1.firstDayOfYear = localeFirstDayOfYear;
proto$1.firstDayOfWeek = localeFirstDayOfWeek;
proto$1.weekdays = localeWeekdays;
proto$1.weekdaysMin = localeWeekdaysMin;
proto$1.weekdaysShort = localeWeekdaysShort;
proto$1.weekdaysParse = localeWeekdaysParse;
proto$1.weekdaysRegex = weekdaysRegex;
proto$1.weekdaysShortRegex = weekdaysShortRegex;
proto$1.weekdaysMinRegex = weekdaysMinRegex;
proto$1.isPM = localeIsPM;
proto$1.meridiem = localeMeridiem;
function get$1(format, index, field, setter) {
var locale = getLocale(),
utc = createUTC().set(setter, index);
return locale[field](utc, format);
}
function listMonthsImpl(format, index, field) {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
if (index != null) {
return get$1(format, index, field, 'month');
}
var i,
out = [];
for (i = 0; i < 12; i++) {
out[i] = get$1(format, i, field, 'month');
}
return out;
}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function listWeekdaysImpl(localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
} else {
format = localeSorted;
index = format;
localeSorted = false;
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
}
var locale = getLocale(),
shift = localeSorted ? locale._week.dow : 0,
i,
out = [];
if (index != null) {
return get$1(format, (index + shift) % 7, field, 'day');
}
for (i = 0; i < 7; i++) {
out[i] = get$1(format, (i + shift) % 7, field, 'day');
}
return out;
}
function listMonths(format, index) {
return listMonthsImpl(format, index, 'months');
}
function listMonthsShort(format, index) {
return listMonthsImpl(format, index, 'monthsShort');
}
function listWeekdays(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
}
function listWeekdaysShort(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
}
function listWeekdaysMin(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
}
getSetGlobalLocale('en', {
eras: [
{
since: '0001-01-01',
until: +Infinity,
offset: 1,
name: 'Anno Domini',
narrow: 'AD',
abbr: 'AD',
},
{
since: '0000-12-31',
until: -Infinity,
offset: 1,
name: 'Before Christ',
narrow: 'BC',
abbr: 'BC',
},
],
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function (number) {
var b = number % 10,
output =
toInt((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
});
// Side effect imports
hooks.lang = deprecate(
'moment.lang is deprecated. Use moment.locale instead.',
getSetGlobalLocale
);
hooks.langData = deprecate(
'moment.langData is deprecated. Use moment.localeData instead.',
getLocale
);
var mathAbs = Math.abs;
function abs() {
var data = this._data;
this._milliseconds = mathAbs(this._milliseconds);
this._days = mathAbs(this._days);
this._months = mathAbs(this._months);
data.milliseconds = mathAbs(data.milliseconds);
data.seconds = mathAbs(data.seconds);
data.minutes = mathAbs(data.minutes);
data.hours = mathAbs(data.hours);
data.months = mathAbs(data.months);
data.years = mathAbs(data.years);
return this;
}
function addSubtract$1(duration, input, value, direction) {
var other = createDuration(input, value);
duration._milliseconds += direction * other._milliseconds;
duration._days += direction * other._days;
duration._months += direction * other._months;
return duration._bubble();
}
// supports only 2.0-style add(1, 's') or add(duration)
function add$1(input, value) {
return addSubtract$1(this, input, value, 1);
}
// supports only 2.0-style subtract(1, 's') or subtract(duration)
function subtract$1(input, value) {
return addSubtract$1(this, input, value, -1);
}
function absCeil(number) {
if (number < 0) {
return Math.floor(number);
} else {
return Math.ceil(number);
}
}
function bubble() {
var milliseconds = this._milliseconds,
days = this._days,
months = this._months,
data = this._data,
seconds,
minutes,
hours,
years,
monthsFromDays;
// if we have a mix of positive and negative values, bubble down first
// check: https://github.com/moment/moment/issues/2166
if (
!(
(milliseconds >= 0 && days >= 0 && months >= 0) ||
(milliseconds <= 0 && days <= 0 && months <= 0)
)
) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;
}
// The following code bubbles up values, see the tests for
// examples of what that means.
data.milliseconds = milliseconds % 1000;
seconds = absFloor(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absFloor(seconds / 60);
data.minutes = minutes % 60;
hours = absFloor(minutes / 60);
data.hours = hours % 24;
days += absFloor(hours / 24);
// convert days to months
monthsFromDays = absFloor(daysToMonths(days));
months += monthsFromDays;
days -= absCeil(monthsToDays(monthsFromDays));
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
data.days = days;
data.months = months;
data.years = years;
return this;
}
function daysToMonths(days) {
// 400 years have 146097 days (taking into account leap year rules)
// 400 years have 12 months === 4800
return (days * 4800) / 146097;
}
function monthsToDays(months) {
// the reverse of daysToMonths
return (months * 146097) / 4800;
}
function as(units) {
if (!this.isValid()) {
return NaN;
}
var days,
months,
milliseconds = this._milliseconds;
units = normalizeUnits(units);
if (units === 'month' || units === 'quarter' || units === 'year') {
days = this._days + milliseconds / 864e5;
months = this._months + daysToMonths(days);
switch (units) {
case 'month':
return months;
case 'quarter':
return months / 3;
case 'year':
return months / 12;
}
} else {
// handle milliseconds separately because of floating point math errors (issue #1867)
days = this._days + Math.round(monthsToDays(this._months));
switch (units) {
case 'week':
return days / 7 + milliseconds / 6048e5;
case 'day':
return days + milliseconds / 864e5;
case 'hour':
return days * 24 + milliseconds / 36e5;
case 'minute':
return days * 1440 + milliseconds / 6e4;
case 'second':
return days * 86400 + milliseconds / 1000;
// Math.floor prevents floating point math errors here
case 'millisecond':
return Math.floor(days * 864e5) + milliseconds;
default:
throw new Error('Unknown unit ' + units);
}
}
}
// TODO: Use this.as('ms')?
function valueOf$1() {
if (!this.isValid()) {
return NaN;
}
return (
this._milliseconds +
this._days * 864e5 +
(this._months % 12) * 2592e6 +
toInt(this._months / 12) * 31536e6
);
}
function makeAs(alias) {
return function () {
return this.as(alias);
};
}
var asMilliseconds = makeAs('ms'),
asSeconds = makeAs('s'),
asMinutes = makeAs('m'),
asHours = makeAs('h'),
asDays = makeAs('d'),
asWeeks = makeAs('w'),
asMonths = makeAs('M'),
asQuarters = makeAs('Q'),
asYears = makeAs('y');
function clone$1() {
return createDuration(this);
}
function get$2(units) {
units = normalizeUnits(units);
return this.isValid() ? this[units + 's']() : NaN;
}
function makeGetter(name) {
return function () {
return this.isValid() ? this._data[name] : NaN;
};
}
var milliseconds = makeGetter('milliseconds'),
seconds = makeGetter('seconds'),
minutes = makeGetter('minutes'),
hours = makeGetter('hours'),
days = makeGetter('days'),
months = makeGetter('months'),
years = makeGetter('years');
function weeks() {
return absFloor(this.days() / 7);
}
var round = Math.round,
thresholds = {
ss: 44, // a few seconds to seconds
s: 45, // seconds to minute
m: 45, // minutes to hour
h: 22, // hours to day
d: 26, // days to month/week
w: null, // weeks to month
M: 11, // months to year
};
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
var duration = createDuration(posNegDuration).abs(),
seconds = round(duration.as('s')),
minutes = round(duration.as('m')),
hours = round(duration.as('h')),
days = round(duration.as('d')),
months = round(duration.as('M')),
weeks = round(duration.as('w')),
years = round(duration.as('y')),
a =
(seconds <= thresholds.ss && ['s', seconds]) ||
(seconds < thresholds.s && ['ss', seconds]) ||
(minutes <= 1 && ['m']) ||
(minutes < thresholds.m && ['mm', minutes]) ||
(hours <= 1 && ['h']) ||
(hours < thresholds.h && ['hh', hours]) ||
(days <= 1 && ['d']) ||
(days < thresholds.d && ['dd', days]);
if (thresholds.w != null) {
a =
a ||
(weeks <= 1 && ['w']) ||
(weeks < thresholds.w && ['ww', weeks]);
}
a = a ||
(months <= 1 && ['M']) ||
(months < thresholds.M && ['MM', months]) ||
(years <= 1 && ['y']) || ['yy', years];
a[2] = withoutSuffix;
a[3] = +posNegDuration > 0;
a[4] = locale;
return substituteTimeAgo.apply(null, a);
}
// This function allows you to set the rounding function for relative time strings
function getSetRelativeTimeRounding(roundingFunction) {
if (roundingFunction === undefined) {
return round;
}
if (typeof roundingFunction === 'function') {
round = roundingFunction;
return true;
}
return false;
}
// This function allows you to set a threshold for relative time strings
function getSetRelativeTimeThreshold(threshold, limit) {
if (thresholds[threshold] === undefined) {
return false;
}
if (limit === undefined) {
return thresholds[threshold];
}
thresholds[threshold] = limit;
if (threshold === 's') {
thresholds.ss = limit - 1;
}
return true;
}
function humanize(argWithSuffix, argThresholds) {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var withSuffix = false,
th = thresholds,
locale,
output;
if (typeof argWithSuffix === 'object') {
argThresholds = argWithSuffix;
argWithSuffix = false;
}
if (typeof argWithSuffix === 'boolean') {
withSuffix = argWithSuffix;
}
if (typeof argThresholds === 'object') {
th = Object.assign({}, thresholds, argThresholds);
if (argThresholds.s != null && argThresholds.ss == null) {
th.ss = argThresholds.s - 1;
}
}
locale = this.localeData();
output = relativeTime$1(this, !withSuffix, th, locale);
if (withSuffix) {
output = locale.pastFuture(+this, output);
}
return locale.postformat(output);
}
var abs$1 = Math.abs;
function sign(x) {
return (x > 0) - (x < 0) || +x;
}
function toISOString$1() {
// for ISO strings we do not use the normal bubbling rules:
// * milliseconds bubble up until they become hours
// * days do not bubble at all
// * months bubble up until they become years
// This is because there is no context-free conversion between hours and days
// (think of clock changes)
// and also not between days and months (28-31 days per month)
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var seconds = abs$1(this._milliseconds) / 1000,
days = abs$1(this._days),
months = abs$1(this._months),
minutes,
hours,
years,
s,
total = this.asSeconds(),
totalSign,
ymSign,
daysSign,
hmsSign;
if (!total) {
// this is the same as C#'s (Noda) and python (isodate)...
// but not other JS (goog.date)
return 'P0D';
}
// 3600 seconds -> 60 minutes -> 1 hour
minutes = absFloor(seconds / 60);
hours = absFloor(minutes / 60);
seconds %= 60;
minutes %= 60;
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
totalSign = total < 0 ? '-' : '';
ymSign = sign(this._months) !== sign(total) ? '-' : '';
daysSign = sign(this._days) !== sign(total) ? '-' : '';
hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
return (
totalSign +
'P' +
(years ? ymSign + years + 'Y' : '') +
(months ? ymSign + months + 'M' : '') +
(days ? daysSign + days + 'D' : '') +
(hours || minutes || seconds ? 'T' : '') +
(hours ? hmsSign + hours + 'H' : '') +
(minutes ? hmsSign + minutes + 'M' : '') +
(seconds ? hmsSign + s + 'S' : '')
);
}
var proto$2 = Duration.prototype;
proto$2.isValid = isValid$1;
proto$2.abs = abs;
proto$2.add = add$1;
proto$2.subtract = subtract$1;
proto$2.as = as;
proto$2.asMilliseconds = asMilliseconds;
proto$2.asSeconds = asSeconds;
proto$2.asMinutes = asMinutes;
proto$2.asHours = asHours;
proto$2.asDays = asDays;
proto$2.asWeeks = asWeeks;
proto$2.asMonths = asMonths;
proto$2.asQuarters = asQuarters;
proto$2.asYears = asYears;
proto$2.valueOf = valueOf$1;
proto$2._bubble = bubble;
proto$2.clone = clone$1;
proto$2.get = get$2;
proto$2.milliseconds = milliseconds;
proto$2.seconds = seconds;
proto$2.minutes = minutes;
proto$2.hours = hours;
proto$2.days = days;
proto$2.weeks = weeks;
proto$2.months = months;
proto$2.years = years;
proto$2.humanize = humanize;
proto$2.toISOString = toISOString$1;
proto$2.toString = toISOString$1;
proto$2.toJSON = toISOString$1;
proto$2.locale = locale;
proto$2.localeData = localeData;
proto$2.toIsoString = deprecate(
'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
toISOString$1
);
proto$2.lang = lang;
// FORMATTING
addFormatToken('X', 0, 0, 'unix');
addFormatToken('x', 0, 0, 'valueOf');
// PARSING
addRegexToken('x', matchSigned);
addRegexToken('X', matchTimestamp);
addParseToken('X', function (input, array, config) {
config._d = new Date(parseFloat(input) * 1000);
});
addParseToken('x', function (input, array, config) {
config._d = new Date(toInt(input));
});
//! moment.js
hooks.version = '2.29.1';
setHookCallback(createLocal);
hooks.fn = proto;
hooks.min = min;
hooks.max = max;
hooks.now = now;
hooks.utc = createUTC;
hooks.unix = createUnix;
hooks.months = listMonths;
hooks.isDate = isDate;
hooks.locale = getSetGlobalLocale;
hooks.invalid = createInvalid;
hooks.duration = createDuration;
hooks.isMoment = isMoment;
hooks.weekdays = listWeekdays;
hooks.parseZone = createInZone;
hooks.localeData = getLocale;
hooks.isDuration = isDuration;
hooks.monthsShort = listMonthsShort;
hooks.weekdaysMin = listWeekdaysMin;
hooks.defineLocale = defineLocale;
hooks.updateLocale = updateLocale;
hooks.locales = listLocales;
hooks.weekdaysShort = listWeekdaysShort;
hooks.normalizeUnits = normalizeUnits;
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
hooks.calendarFormat = getCalendarFormat;
hooks.prototype = proto;
// currently HTML5 input type only supports 24-hour formats
hooks.HTML5_FMT = {
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', //
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', //
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', //
DATE: 'YYYY-MM-DD', //
TIME: 'HH:mm', //
TIME_SECONDS: 'HH:mm:ss', //
TIME_MS: 'HH:mm:ss.SSS', //
WEEK: 'GGGG-[W]WW', //
MONTH: 'YYYY-MM', //
};
return hooks;
})));
/***/ }),
/***/ "./node_modules/tslib/tslib.es6.js":
/*!*****************************************!*\
!*** ./node_modules/tslib/tslib.es6.js ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "__extends": function() { return /* binding */ __extends; },
/* harmony export */ "__assign": function() { return /* binding */ __assign; },
/* harmony export */ "__rest": function() { return /* binding */ __rest; },
/* harmony export */ "__decorate": function() { return /* binding */ __decorate; },
/* harmony export */ "__param": function() { return /* binding */ __param; },
/* harmony export */ "__metadata": function() { return /* binding */ __metadata; },
/* harmony export */ "__awaiter": function() { return /* binding */ __awaiter; },
/* harmony export */ "__generator": function() { return /* binding */ __generator; },
/* harmony export */ "__createBinding": function() { return /* binding */ __createBinding; },
/* harmony export */ "__exportStar": function() { return /* binding */ __exportStar; },
/* harmony export */ "__values": function() { return /* binding */ __values; },
/* harmony export */ "__read": function() { return /* binding */ __read; },
/* harmony export */ "__spread": function() { return /* binding */ __spread; },
/* harmony export */ "__spreadArrays": function() { return /* binding */ __spreadArrays; },
/* harmony export */ "__spreadArray": function() { return /* binding */ __spreadArray; },
/* harmony export */ "__await": function() { return /* binding */ __await; },
/* harmony export */ "__asyncGenerator": function() { return /* binding */ __asyncGenerator; },
/* harmony export */ "__asyncDelegator": function() { return /* binding */ __asyncDelegator; },
/* harmony export */ "__asyncValues": function() { return /* binding */ __asyncValues; },
/* harmony export */ "__makeTemplateObject": function() { return /* binding */ __makeTemplateObject; },
/* harmony export */ "__importStar": function() { return /* binding */ __importStar; },
/* harmony export */ "__importDefault": function() { return /* binding */ __importDefault; },
/* harmony export */ "__classPrivateFieldGet": function() { return /* binding */ __classPrivateFieldGet; },
/* harmony export */ "__classPrivateFieldSet": function() { return /* binding */ __classPrivateFieldSet; }
/* harmony export */ });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
var __createBinding = Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
function __exportStar(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
/** @deprecated */
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
/***/ }),
/***/ "./assets/images/loader.gif":
/*!**********************************!*\
!*** ./assets/images/loader.gif ***!
\**********************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__.p + "images/loader.757857ce.gif";
/***/ }),
/***/ "react":
/*!************************!*\
!*** external "React" ***!
\************************/
/***/ (function(module) {
"use strict";
module.exports = window["React"];
/***/ }),
/***/ "react-dom":
/*!***************************!*\
!*** external "ReactDOM" ***!
\***************************/
/***/ (function(module) {
"use strict";
module.exports = window["ReactDOM"];
/***/ }),
/***/ "@wordpress/element":
/*!*********************************!*\
!*** external ["wp","element"] ***!
\*********************************/
/***/ (function(module) {
"use strict";
module.exports = window["wp"]["element"];
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ loaded: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/global */
/******/ !function() {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/node module decorator */
/******/ !function() {
/******/ __webpack_require__.nmd = function(module) {
/******/ module.paths = [];
/******/ if (!module.children) module.children = [];
/******/ return module;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/publicPath */
/******/ !function() {
/******/ var scriptUrl;
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
/******/ var document = __webpack_require__.g.document;
/******/ if (!scriptUrl && document) {
/******/ if (document.currentScript)
/******/ scriptUrl = document.currentScript.src
/******/ if (!scriptUrl) {
/******/ var scripts = document.getElementsByTagName("script");
/******/ if(scripts.length) scriptUrl = scripts[scripts.length - 1].src
/******/ }
/******/ }
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
/******/ __webpack_require__.p = scriptUrl;
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
!function() {
"use strict";
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Widgets_EventCalendarClassic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Widgets/EventCalendarClassic */ "./src/Widgets/EventCalendarClassic.js");
/* harmony import */ var _Widgets_EventCalendarStandard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Widgets/EventCalendarStandard */ "./src/Widgets/EventCalendarStandard.js");
/* harmony import */ var _Widgets_EventCalendarStandardList__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Widgets/EventCalendarStandardList */ "./src/Widgets/EventCalendarStandardList.js");
const evnetin_pro_active = localized_data_obj.evnetin_pro_active;
let init = function ($scope) {
const [el] = $scope.find('.events_calendar_classic');
const [element2] = $scope.find('.events_calendar_standard');
const [element3] = $scope.find('.events_calendar_list');
const dataCat = el === null || el === void 0 ? void 0 : el.getAttribute('data-cat');
const dataControls = el === null || el === void 0 ? void 0 : el.getAttribute('data-controls');
const dataCat2 = element2 === null || element2 === void 0 ? void 0 : element2.getAttribute('data-cat');
const dataControls2 = element2 === null || element2 === void 0 ? void 0 : element2.getAttribute('data-controls');
const dataCat3 = element3 === null || element3 === void 0 ? void 0 : element3.getAttribute('data-cat');
const dataControls3 = element3 === null || element3 === void 0 ? void 0 : element3.getAttribute('data-controls');
/**
* Renders the main component
*/
if (el != undefined) {
ReactDOM.render((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(React.StrictMode, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Widgets_EventCalendarClassic__WEBPACK_IMPORTED_MODULE_1__["default"], {
dataCat: dataCat,
dataControls: dataControls
})), el);
} else if (element2 != undefined && evnetin_pro_active) {
ReactDOM.render((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(React.StrictMode, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Widgets_EventCalendarStandard__WEBPACK_IMPORTED_MODULE_2__["default"], {
dataCat: dataCat2,
dataControls: dataControls2
})), element2);
} else if (element3 != undefined && evnetin_pro_active) {
ReactDOM.render((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(React.StrictMode, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Widgets_EventCalendarStandardList__WEBPACK_IMPORTED_MODULE_3__["default"], {
dataCat: dataCat3,
dataControls: dataControls3
})), element3);
}
};
jQuery(window).on('elementor/frontend/init', () => {
let widgetsList = ['etn-event-calendar', 'etn-event-calendar-pro'];
init(elementorFrontend.elements.$body);
widgetsList.forEach(event => {
elementorFrontend.hooks.addAction('frontend/element_ready/' + event + '.default', init);
});
}).on('load', function () {
const shortcodeEls = document.querySelectorAll('.eventin-shortcode-wrapper');
shortcodeEls.forEach(el => {
init(jQuery(el));
});
});
}();
/******/ })()
;
//# sourceMappingURL=index.js.map